contentlayerdev / contentlayerdev/contentlayer

Don't gitignore the generated types to ensure code integrity

Đang mở
#118 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
meta: never-stale
Ngôn ngữ chính
TypeScript
Star
3.5k
Fork
192
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

The .contentlayer folder includes two types of auto-generated resources:

- The JSON files generated from the underlying content.
- The ts files generated from the Contentlayer schema.

Current architecture assumes that both types of resources should be gitignored.

What I would like to suggest is to not git-ignore the generated types and commit them with the source code. Maybe into a separate `src/types` folder or something similar.

The types are used everywhere within the code, and therefore are being an integral part of it. Having the code without its types makes the impression that the code is incomplete.

For example, opening a GitHub's web-based editor (`github.dev`) with project powered by Contentlayer unveils a code that extensively uses types, but no types are available within the repo. And it creates an impression that the integrity of the code is not complete.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.