${pkg.description}
-
Babel transpiling
npm start
(using babel)Write your code in ES6.
-
Watch files and reload
npm run dev
(using nodemon)Run your script and watch for changes.
-
Debugging
npm run debug
(using babel-node-debug)Debug your application using a babel-compatible version of node-inspector.
-
Test runner
npm test
(using lab)Write your tests in the
test
folder and run them withnpm test
. -
Code coverage
npm run coverage
(using lab)Lab can also calculate the code coverage.
-
Code linting
npm run lint
(using xo)Lint your code (even ES6/7 and JSX).
-
Code format
npm run format
(using xo)Beautify and format you code. Fix errors found by xo
-
Recognize duplicate code
npm run inspect
(using jsinspect)Recognize duplicate, copy-pasted and similar code.
-
License checker
npm run licenses
(using license-checker)Print the link and the license type of each dependency
-
Package building
npm run build
(using nar)You can build an executable file out of your project including all dependencies.
Please refer to nar's documentation if you like to include a custom node.js version or to build a package for a different system-architecture/OS. You should simple edit the
build
property in thescripts
section ofpackage.json
to something like:
nar create --executable --os darwin --arch x64 --node 0.12.0
-
Find vulnerabilities
npm run deps:sec
(using nsp)nsp (Node Security Project) will check if any dependency is affected by a known vulnerability.
-
Keep dependencies up-to-date
npm run deps:updates
(using david)David keeps dependencies up-to-date and will help you to update them.
-
README generator
npm run readme
(using node-readme)Generate a README like this from an ES6 template extracting data from
package.json
. Edit the.README.md
template and run the command. Check the node-readme documentation for all available variables/functions.Do not edit the
README.md
in your project folder, since this will be overwritten running thenpm run readme
command. -
Git hooks (using husky)
Custom
precommit
andprepush
are defined in order to run tests (and vulnerabilities discovery) on commit and push. You can define your own in thepackage.json
git clone ${pkg.repository}
cd ${pkg.name}
npm install
Use npm
commands listed above as following:
npm run lint
npm run test:deps
or use npm-run-all:
npm-run-all --parallel lint test:deps test --sequential build
${scripts()}
${dependencies()}
- Documentation tool (JSDoc, dox, ...)
- Aggregate commands using npm-run-all
- Use a scaffolding system (init)
- Consider standard instead of xo
- Fix nar: should be able to use $npm_package_main variable (see h2non/nar#115 and h2non/nar#116)
- Consider strong-build instead of nar
- Consider semantic-release
- Consider hotel and minihost
Contributions welcome; Please submit all pull requests the against master branch.
${author()}
${license()}