contentlayerdev / contentlayerdev/contentlayer

Don't gitignore the generated types to ensure code integrity

未关闭
#118 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
meta: never-stale
主要语言
TypeScript
星标
3.5k
派生
192
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。