NodeJS module boilerplate
First, install Yeoman and generator-node-module-boilerplate using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-node-module-boilerplateThen generate your new project:
yo node-module-boilerplate.gitignore.eslintrc(airbnb).npmignore.codeclimate.yml.travis.yml.editorconfig- nodemon
- git-pre-push (run test)
- git-pre-commit (run lint)
- git-post-commit (run git status)
-
Development
npm run devrun nodemon and tests (importing from
src/) -
Coverage
npm run coveragerun istanbul coverage and put result in
coverage/ -
Code Climate
npm run climate-coveragerun coverage and send it to code-climate (you need to set CODECLIMATE_REPO_TOKEN as an enviroment variable)
-
Code Climate dotenv
npm run climate-coverage-dotenvrun coverage and send it to code-climate (you need to set CODECLIMATE_REPO_TOKEN in .env file)
-
Start
npm startrun
node src/index.js -
Dependencies Vulnerabilities
npm run check-dependenciescheck dependencies vulnerabilities using nsp
-
Post install
npm run postinstallcall check-dependencies, this is will be called after every package installation
-
Linter
npm run lintrun
eslint srcaccording.eslintrcfile -
Tests
npm testrun
mocha
MIT © Marcos Rava