Modern JavaScript Project Workflow/Setup – Git, CI/CD, Code Quality, Tooling, Modules, Documentation, Demos
Written on 31st Aug 2020
Modern Project
- Version control
- Automated CI / CD
- Code quality
- Tooling
- Module support
- Documented API
- Demos
Build Process
The automated sequence of tasks which runs on each push, tag, and/or release
Stages
- Install
- Lint
- Test
- build
- Push
- Deploy
Jobs
- Install
- clean install –
npm ci - security audit –
npm audit
- clean install –
- Lint
- linter –
/eslintstylelint - formatter
prettier
- linter –
- Test
- test suite –
/jest
/mochaava - code coverage –
/nyc
/codecovcoveralls
- test suite –
- Build
- transpile –
/babel
/typescriptflow - pre-process (compile, auto-prefix, etc.) –
/sass
/lesspostcss - uglify (minify, mingle, optimize, etc.) –
/uglify-jsterser - bundle (
,concat
, etc.) –tree-shake
/webpack
/rollupparcel - compress (gzip, etc.)
- other
- copy / delete / move files
- check bundle size
- strip unused code (ts/flow/proptypes)
- transpile –
- Push
- release –
/GitHub
/bitbucketGitlab - publish –
/other registriesnpm
- release –
- Deploy
- host –
/heroku
/surge
/ etc.github-pages
- host –
- Documentation
Task execution
- CLI (
) ornpm - task runner
,grunt
,gulpbrunch