I think the generated files should not in git, it should be a hard rule. We can add some helpers in git hooks to help developers to avoid missing the generating step.
pre-commit: Do nx format:write
~post-commit: Generate files~
pre-push: Check branch name
~Putting the generating scripts into post-commit can cause commit slow but looks like there is no better hook to put them.~
Remove generate scripts from git hooks, motion it in the document and let developers manually do it.
TODO:
[x] Remove all generated files from git
[x] Migrate all the scripts into Nx project.json
[x] Add all scripts into package.json
[x] Move the scripts into the right hook
[x] Make sure CI works
[x] Describe the hooks and generate scripts in README
@solomondefi-dev please let me know if you have other ideas.
I think the generated files should not in git, it should be a hard rule. We can add some helpers in git hooks to help developers to avoid missing the generating step.
pre-commit
: Donx format:write
post-commit
: Generate files~pre-push
: Check branch name~Putting the generating scripts into
post-commit
can cause commit slow but looks like there is no better hook to put them.~Remove generate scripts from git hooks, motion it in the document and let developers manually do it.
TODO:
project.json
package.json
@solomondefi-dev please let me know if you have other ideas.