generator-restify-with-tests v0.0.1
generator-restify-with-tests
Restify api with unit and integrated tests
Installation
First, install Yeoman and generator-restify-with-tests using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-restify-with-testsThen generate your new project:
yo restify-with-testsFeatures
Including
.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)
Usage
Scripts
Development
npm run devrun nodemon and tests
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.jsDependencies 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.eslintrcfileTests
Unit
npm testrun
mocha --opts test/unit/mocha.opts test/unitIntegration
npm run test-integrationrun
mocha --opts test/integration/mocha.opts test/integrationAll
npm run test-allrun
npm test && npm run test-integration
Getting To Know Yeoman
- Yeoman has a heart of gold.
- Yeoman is a person with feelings and opinions, but is very easy to work with.
- Yeoman can be too opinionated at times but is easily convinced not to be.
- Feel free to learn more about Yeoman.
License
MIT © Marcos Rava
9 years ago