CI with NodeJs and TravisCI
Code is hosted on GitHub and tests are run on TravisCI on every push to master
branch.
This is base set of tools that help writing JavaScript code.
They are not obligatory but they are great help!
Eslint will help you to write code with consistent style (quotation, indentation, unused variable, ...).
Consider using @flow
for type checking.
If file starts with /* @flow */
it will be checked for type use consistency.
It will tell if you return type that is not expected, or eg. pass parameter of
string and number is expected.
For example check src/index.js
.
Install plugins to Sublime Text 3:
- SublimeLinter
- SublimeLinter-contrib-eslint
- SublimeLinter-flow
- ESLint-Formatter
Optional:
- Babel
- DocBlockr
- FileManager
- GitGutter
- Pretty JSON
- SublimeLinter-annotations
git clone https://github.com/vukanac/ci-base-nodejs.git jsstarter
cd jsstarter
npm install
npm run flow start
npm run flow status
npm test
npm run flow stop
Watching for changes:
npm run test-watch
npm test
MIT
Vladimir Vukanac