setup-node/docs/contributors.md

22 lines
997 B
Markdown
Raw Normal View History

2019-05-31 00:29:40 -04:00
# Contributors
2019-06-05 11:44:00 -04:00
### Checkin
2019-05-31 00:29:40 -04:00
- Do checkin source (src)
- Do checkin build output (lib)
- Do checkin runtime node_modules
2019-06-05 11:44:00 -04:00
- Do not checkin devDependency node_modules (husky can help see below)
2019-05-31 00:29:40 -04:00
2019-06-05 11:44:00 -04:00
### Husky
2019-05-31 00:29:40 -04:00
2019-06-05 11:44:00 -04:00
We run [Husky](https://github.com/typicode/husky) before each commit to ensure that formatting and checkin rules are followed. To make sure Husky runs correctly, please use the following workflow:
2019-05-31 00:29:40 -04:00
2019-06-05 11:44:00 -04:00
```
npm install # installs all devDependencies including Husky
git add abc.ext # Add the files you've changed. This should include files in src, lib, and node_modules (see above)
git commit -m "Informative commit message" # Commit. This will run Husky
```
2019-05-31 00:29:40 -04:00
2019-06-05 11:44:00 -04:00
Husky will take care of formatting all files with [Prettier](https://github.com/prettier/prettier) as well as pruning out devDependencies using `npm prune --production`.
It will also make sure these changes are appropriately included in your commit (no further work is needed)