In favour of modern-package-boilerplate
- Build with webpack 2 and babel
- Test with mocha, chai and sinon
- Cover with istanbul
- Lint with eslint (air-bnb config)
- CI with travis-ci.org
- Coverage info with coveralls.io
- Clone this repo from github
- Inside repo directory run
npm install && rm -r .git && git init
- Update package.json with your information
Delete all cache and output files
Build your library in development mode
Build your library in production mode
Run tests
Run tests in watch mode
Cover your code (Work with ES6)
Sends coverage details to coveralls.io. Used in .travis.yml and should not be used manually.
Check your code for errors and code styles
Hook for npm, that executes when you publishing package in npm repository.
This boilerplate uses
air-bnb code style conventions,
however if you don't like it, you can disable it, by removing the following line in
.eslintrc
config file:
{
//...
"extends": "airbnb"
}
If you are as tired as me to write '../../../' in the
require statements, you can use
alias feature provided by webpack.
Here is an example of aliases, built in this boilerplate
by default (builder/resolve.js
):
resolve: {
alias: {
Src: path.resolve(process.cwd() + '/src'),
Lib: path.resolve(process.cwd() + '/lib')
}
}
Feel free to add your custom aliases, they are awesome.