es7-babel-starter
v1.1.1
Published
Author libraries in ES2016 / ES7 for Node.
Maintainers
Readme
ES7 - Babel Library Boilerplate
Contents
Development Experience
- ES6 / ES7 transpilation with Babel
- ES6+ minification with Babili babili
- ES6+ Testing via babel-register with Mocha & Chai
- HTML Test Reports via mochawesome
- Code Linting with ESLint
- Benchmark Testing with benchmark.js
- Code monitoring and auto server restart with nodemon
- Debugging with babel-node-debug
- Security vulnerability scan with nsp
- Docker build for non-lib projects.
Usage
npm start- execute code insrcdirectory with live reload vianodemontranspiled withbabel-nodenpm run serve:dev <target>- execute target code with live reload vianodemontranspiled withbabel-nodenpm run debug src- execute code with debug flag enablednpm run benchmark- run benchmark tests withbenchmark.jsnpm run benchmark:watch- run benchmark tests withbenchmark.jsand watch for file changesnpm run lint- code linting witheslintnpm run lint:fix- fix problems automatically witheslintnpm test- run tests withmochaandchaiwith spec as reporter andnyccode coveragenpm run test:watch- run tests withmochaandchaiand watch for changesnpm run test:reporter-list- run tests withmochaandchaiwithlistreporternpm run test:export- export tests results as html files in the./reportsfolder viamochasomenpm run build:dist- transpile and minify ES6+ code and create sourcemaps withbabel&babilinpm run serve:dist- serve production files from the./distfolder vianodenpm run scan:security- run vulnerability tests via the node security platformnspnpm run scan:updates- check for latest versions of dependencies viancu
Testing
Testing with Mocha and Chai, HTML Reports via mochawesome
npm test
Benchmarking Suite
Benchmark Testing with Benchmark.js
npm run benchmark
Debugging
Currently a known issues in node-inspector/. in current Version 0.12.8 here prevents use with Node Version 6x.
Current debug workaround for node 6.x:
"debug": "nodemon $2 --exec babel-node --debug",
When issues is resolved or on version 4.x / 5.x:
"debug": "babel-node-debug $2",
and run it via ...
npm run debug src
Security & Updates
Run vulnerability tests via Node Security Project
Check for dependency updates via NPM Check Updates
