contentlayerdev / contentlayerdev/contentlayer

Don't gitignore the generated types to ensure code integrity

オープン
#118 コメント 2 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。