Client-side JavaScript Module Builder
Eliminates boilerplate required to test, lint, and build client-side CommonJS projects.
Provided Tasks
# Builds, tests, lints, and minifies the module and puts in in the ./build folder. gulp bpjs:build # Incrementally builds, tests, and lints files as they're modified. gulp bpjs:dev
Use
Requires Gulp 4.0. Execute npm install --save-dev gulp boilerplate-gulp-js
, then modify your Gulpfile.js
like so (or create one):
var gulp = path= bpjs = ; ; // Rest of your gulp file, potentially overwriting the boilerplate-gulp tasks...
Capabilities
- Compiles JavaScript CommonJS modules into a single file (browserify) which can be loaded directly in a browser, via CommonJS loader, or a AMD loader. Produces both an unminified version and a minified version with source maps.
- Run unit tests (jasmine.
- Generates coverage reports (istanbul) for unit tests.
- Lints JS (jshint)