build-control
May 3, 2016 ยท View on GitHub
build-control
Build control using git exposed as ES2015 modules
Install
npm install --save-dev build-control
Usage
-
Direct use
import BuildControl from 'build-control' let bc = new BuildControl({}) // bump version bc.npm.bump() // check before a long test run bc.prepublishCheck() // run it bc.run() // publish on npm bc.npm.publish() -
Use with gulp-pipeline
See this project's gulpfile.babel.js for a full example.
gulpfile.babel.js
```javascript
import gulp from 'gulp'
import {Prepublish, PublishBuild} from 'gulp-pipeline'
new Prepublish(gulp, preset, buildControlConfig)
new PublishBuild(gulp, preset, buildControlConfig)
```
2. Run it
```javascript
gulp prepublish
gulp publishBuild
```
Options
Please see the BuildControl class for a list of configuration options.
Projects using build-control through gulp-pipeline
Be sure to check out their dist branch to see what the default distribution looks like when using gulp-pipeline's Prepublish, PublishBuild, PublishGhPages, and PublishNpm which delegate directly to build-control.
- keys.js - very simple ES2015 setup with Mocha tests + automatic deployment (tag +
distbranch + npm) - picker.js - SCSS + ES2015 + Mocha PhantomJs tests written as ES2015 + automatic deployment (tag +
distbranch + npm) - bulid-control - ES2015 with automatic deployment using itself through
gulp-pipeline - bootstrap-material-design - complex fully custom setup ES2015 + SCSS + independent DOCS pipeline + Jekyll + automatic deployment (tag +
distbranch + npm)
Credits
Most of this code was inspired by grunt-build-control.