Open genkio opened 6 years ago
bits and pieces of npm script workflow for turbo boosting your productivity.
$ npm config set init.author.email "" $ npm config set init.author.name "Ji Wu" $ npm config set init.author.url "http://github.com/j1wu" $ npm config set init.license "MIT" $ npm config set init.version "0.1.0"
$ npm init -f
Replace && with & to connect commands, or use the npm-run-all library.
&&
&
npm-run-all
... "test": "npm-run-all --parallel lint:* ava" ...
... "pretest": "npm run lint", "test": "ava tests/" ... "precover": "rm -rf coverage", "cover": "nyc --reporter=html npm test", "postcover": "rm -rf .nyc_output && opn coverage/index.html"
"config": { "port": 3000 }, "scripts": { "cover:serve": "http-server coverage_archive/$npm_package_version -p $npm_package_config_port", }
Quick start a npm project.
Run npm scripts in parallel
Replace
&&
with&
to connect commands, or use thenpm-run-all
library.Use pre and post hook to perform tasks before or after certain script
Use custom variables