NPM Boilerplate Node Browser
Boilerplate for creating an NPM module for Node and browser environments.
Installation
$ npm install npm-boilerplate-node-browser
CDN
The library is available over a CDN:
<!-- Or the minified version -->
Usage
; async { const result = ; console;};
API
Parameters
bar
(String
): Requires string.baz
(optionalObject
): Optional object, default to{}
.
Returns
It returns a Promise
which when resolved contains something.
Related
- npm-boilerplate-node: Boilerplate for creating an NPM module for Node environment.
License
Using the Boilerplate
Download the boilerpate:
wget https://github.com/risan/npm-boilerplate-node-browser/archive/master.zip \ -O master.zip && \ unzip master.zip && \ mv npm-boilerplate-node-browser-master my-package && \ rm master.zip
Toolings:
- Rollup for module bundler.
- Babel for transforming ES2015+ code.
- Jest for testing.
- ESLint for linting.
- Prettier for code formatting.
Available scripts:
npm run build
: Run the module bundler.npm run lint
: Run the linter.npm run lint-fix
: Apply the linter fixes.npm run test
: Run the tests.
Third-party services:
- Travis CI for continous integration.
- Codecov for test coverage report.
- Greenkeeper for automated dependency management.