Boilerplate for creating nodejs libraries.
- es6 to es5 transpile on prepublish (babel-cli)
- Test (mocha + chai)
- Coverage (isparta + istanbul)
-
Download repository and remove .git folder
-
Edit package.json. Be sure to change name, description, version, author, repositories, bugs and homepage.
-
Update badges inside README.md
-
Install dependencies
npm install
-
Run mocha test for development. So you can see if you're tests (even if you have not written one) are still passing.
npm run dev
-
Write some tests. It's located at ./test
-
Write some codes to make your tests pass. It's located at ./src
-
Check coverage and improve your tests.
npm run cover
Then open at ./cover/index.html
-
Modify it as long as you want.
I put .coveralls.yml in .gitignore as per advice on their site. If you want to update coverage after travis-ci run your tests you need to add "COVERALLS_REPO_TOKEN" environment on your travis-ci.
- Go to https://coveralls.io and get your repo_token.
- Go to https://travis-ci.org/GUTHUBUSERNAME/PROJECTNAME/settings.
- Add Environment Variables.
- Push another commit for it to update.