- ES6 to ES5 transpile: Babel
- Test Utility: Lab
- Assertion Lib: Code
- Lint: eslint with babel-eslint
- Clone this repository
[email protected]:ubaltaci/hapi-plugin-boilerplate.git
- Install dependencies
npm install
- Check
src/index.es6
file, its a simple plugin adds a route to hapi server. - Run
npm run compile
, transpiled file will located indist/index.js
- Run test with
npm run test
src
folder contains all ES6 sourcedist
folder contains transpiled ES5 codetest
folder contains ES6 tests withtransformer.js
to telllab
how to transpile ES6 files.
- lint
npm run lint
executeeslint
onsrc
folder withbabel-eslint
parser and reports. - compile
npm run compile
executebabel
onsrc
folder and outputs todist
folder. - test
npm run test
executelab
on test folder with custom transpile information. - coverage
npm run coverage
coverage report by Lab. - prepublish called before
npm publish
just in case to forget to compile before publish.