- Version control
- Automated CI / CD
- Code quality
- Tooling
- Module support
- Documented API
- Demos
Automated sequence of tasks that runs on each push, tag, and/or release.
- install
- lint
- test
- build
- push
- deploy
- install
- clean install -
npm ci - security audit -
npm audit
- clean install -
- lint
- linter -
eslint/stylelint - formatter
prettier
- linter -
- test
- test suite -
jest/mocha/ava - code coverage -
nyc/codecov/coveralls
- test suite -
- build
- transpile -
babel/typescript/flow - pre-process (compile, auto-prefix, etc.) -
sass/less/postcss - uglify (minify, mingle, optimize, etc.) -
uglify-js/terser - bundle (concat, tree-shake, etc.) -
webpack/rollup/parcel - compress (gzip, etc.)
- other
- copy / delete / move files
- check bundle size
- strip unused code (ts/flow/proptypes)
- transpile -
- push
- release -
github/bitbucket/gitlab - publish -
npm/ other registry
- release -
- deploy
- host -
heroku/surge/github-pages/ etc.
- host -
- CLI (
npm) - task runner
grunt,gulp,brunch
style=""prop
Ups
👍 Easy SSR
👍 Single import
👍 No extra build step
Downs
👎 Can't use advanced CSS (keyframe, etc.)
👎 Very high specificity
<style>tag
Ups
👍 Easy SSR
👍 Single import
👍 Tree shaking both JS & CSS
Downs
👎 Risk of name collisions
👎 Heavier bundles (duplicated CSS)
styles.css
Ups
👍 Easy SSR
👍 Lighter bundles (CSS extracted)
Downs
👎 Risk of name collisions
👎 No tree shaking in CSS
👎 Two imports JS & CSS
Ups
👍 Unique class names
👍 Single import
👍 Tree shaking both JS & CSS
Downs
👎 Hard/impossible SSR
👎 Heavier bundles (duplicated CSS)
Ups
👍 Unique class names
👍 Single import
👍 Tree shaking both JS & CSS
Downs
👎 Much heavier bundles (extra dep)
👎 Extra setup in the API