0.0.1 • Published 11 years ago
hapi-plugin-boilerplate v0.0.1
Hapi Plugin Boilerplate in ES6
- ES6 to ES5 transpile: Babel
 - Test Utility: Lab
 - Assertion Lib: Code
 - Lint: eslint with babel-eslint
 
Get started
- Clone this repository 
git@github.com:ubaltaci/hapi-plugin-boilerplate.git - Install dependencies 
npm install - Check 
src/index.es6file, 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 
Structure
srcfolder contains all ES6 sourcedistfolder contains transpiled ES5 codetestfolder contains ES6 tests withtransformer.jsto telllabhow to transpile ES6 files.
NPM scripts
- lint 
npm run lintexecuteeslintonsrcfolder withbabel-eslintparser and reports. - compile 
npm run compileexecutebabelonsrcfolder and outputs todistfolder. - test 
npm run testexecutelabon test folder with custom transpile information. - coverage 
npm run coveragecoverage report by Lab. - prepublish called before 
npm publishjust in case to forget to compile before publish. 
0.0.1
11 years ago