This project is a skeleton for a typical NodeJS application.
The idea is to group useful tools and good practices for every application is being developed in node.
- Clone this repository:
git clone https://github.com/hwndept/node-seed - Remove .git directory
- Update package.json
- set "name"
- set "version"(0.0.0 by default)
- set "description"
- set "author"
- set "license"
- set right "keywords" or remove this section
- set your "repository" or remove this section
- set "buggs" or remove this section
- set "homepage" or remove this section
- Update README.md
- Update .travis.yml to use Travis as CI or remove it. repo_token used in config is the codeclimate's token. Every build on travis will report code coverage value to codeclimate.
- Code linter - jshint
- Code style checker - jscs
- Test runner - mocha;
- Test coverage checker - istanbul;
- Task manager - gulp;
- Pre-commit hook;
- JsDoc generation - jsdoc;
- ES6 Support(ECMA-262, Edition 5) - babel;
- Codeclimate integration codeclimate;
- TravisCI integation travis-ci;
gulp jshintCode that will be validated:
- all *.js files in src folder
- all *.js files in test folder
- gulpfile.js
gulp jscsCode that will be validated:
- all *.js files in src folder
- all *.js files in test folder
- gulpfile.js
gulp testTest cases stored in files test/**/*.test.js will be run only
Coverage reports will be generated and stored in folder build/coverage
gulp jsdocDocumentation will be generated for *.js files from src folder and stored in folder build/jsdoc
Since nodejs doesn't fully support all ES6 features source code should be compiled.
gulp compileSource code in src folder will be compiled and stored in folder build/source
gulp
# or
gulp buildThis hook is invoked by git commit, and can be bypassed with --no-verify option.
The task gulp build will be run automatically.
build/ --> build results
coverage --> code coverage reports
jsdoc --> documentation generated for source code
src/ --> source files for the application
hello.js --> added just for an example
test/ --> test files for the application
.jshintrc --> configuration file for jshint; these rules will
be applied for files in this folder only;
created because test cases contain global functions
which exports by mocha(describe, it,beforeEach, etc)
hello.test.js --> added just for an example
.jscsrc --> configuration file for jscs
.jshintrc --> configuration file for jshint
.travis.yml --> configuration file for travis-ci
gulpfile.js --> list of all gulp tasks