Boilerplate structure to start writing an npm module using es6.
- Transpile with babel (ES6 to ES5)
- Build with webpack (manage dev and build modes)
- Lint with eslint
- Test and coverage with jest
- Test builds with travis
- Automatically publish coverage with coveralls through travis
npm test- Run tests using mocha.npm run test- Run tests.npm run coveralls- Run tests and output coverage to coveralls.npm run lint- Run linting using eslint and the defined rules and settings in .eslintrc.npm run lint:watch- Run linting in watch mode.npm run clean- Remove thelib/folder.npm run build- Run the code transpilation and output an obfuscated.min.jsfile.npm run dev- Run the code transpilation, lint and test all in watch mode. Used while developing.npm run doc- Generate documentation using jsdoc from comments within the code
- Clone the git repository and remove the
.gitfolder. - Replace the libary name 'npm-module-es6-boilerplate' with your own npm module name. Replace:
package.json: "Name", "main", "description", "author", "keywords", "repository" and any other tag values.webpack.config.js: libraryName variable to match your module name from package.json- Replace the contents of
README.mdwith descriptions of your module
- Replace files in
src/andtest/with your own custom internal modules and tests. Npm publish ./
Easy starting point for any npm module using es6.
If you are interested in contributing please contact oskari.rautiainen@gmail.com