Minimal tested and fully functional NPM package template project for ES6+ Javascript.
This template is intended to allow you to start developing immediatly with a working set of tools and scripts that play well together.
It is little opinionated to the point, that only the most basic tools are integrated. If you want a different flavour you can fork this project and easily replace the tools or add new ones.
All tools are only defined as dev-dependencies
:
- Babel for transpiling ES6+ to ES5 plus minification, sourcemaps etc.
- Mocha and Chai for testing
- Istanbul for code coverage
- Standard for linting
- JSDoc for documentation and jsdoc-to-markdown to create docs as markdown files
- Travis-CI for continuous integration
- GitHub actions for continuous integration
Just create your Js files in the ./lib
folder and add the tests in the test
folder.
We use standard
as opinionated but zero-config linter.
You can run lint in two modes:
$ npm run lint
$ npm run lint:fix
We use mocha and chai with a mostly (but not strict) behavioural style for testing. You can run the tests in three different contexts:
$ npm run test
$ npm run test:watch
$ npm run test:coverage
Documentation is using jsDoc and is available as html or markdown version.
To build the documentation in development, you need to run
$ npm run docs
MIT, see license file