shipit-bower v0.2.1
shipit-bower
A set of tasks for Shipit used for bower specific tasks on deploy.
This is a modified version of the shipit-npm extension by @callerc1. This extension was forked from the 0.2.0 tag and is feature matched to that version. The majority of the work was undertaken by @callerc1 who set up a well written plug-in that was easy to repurpose.
Features:
- Triggered on the
updatedorfetchedevent from shipit-deploy - Has a direct pass though task to bower api
- Works via shipit-cli and grunt-shipit
Install
$ npm install shipit-bowerUsage
Just simply run: (This triggers the bower task on the deploy updated or fetched event. No additional config necessary.)
$ shipit staging deployOr you can run the tasks separatly :
$ shipit staging bower:init bower:install
$ shipit staging bower:run --cmd "update"Options shipit.config.bower
bower.remote
Type: Boolean
Default: true
A Boolean to determine whether to run the task in local workspace or on the remote.
bower.installArgs
Type: Array or String
Default: []
An array or string specifying bower args passed to the bower install cmd.
bower.installFlags
Type: Array or String
Default: []
An array or string specifying bower flags passed to the bower install cmd.
bower.triggerEvent
Type: String,Boolean
Default: updated or fetched (depending on bower.remote value)
An event name that triggers bower:install. Can be set to false to prevent the bower:install task from listening to any events.
Example shipitfile.js options usage
module.exports = function (shipit) {
require('shipit-deploy')(shipit);
require('shipit-bower')(shipit);
shipit.initConfig({
default: {
bower: {
remote: false,
installArgs: ['materialize'],
installFlags: ['--save']
}
}
});
};Workflow tasks
- bower
- bower:init
- Emit event "bower_inited".
- bower:install
- Runs bower install (with any Args
bower.installArgsor Flagsbower.installFlagsdefined in options) - Emit event "bower_installed"
- Runs bower install (with any Args
- bower:run
- Runs bower command.
- bower:init
Event flow:
- on Event "deploy" (shipit-deploy initialized)
- Runs bower:init
- on Event "bower_inited"
- Runs bower:install (Triggered on the
updatedorfetchedevent from shipit-deploy or by a custombower.triggerEventas mentioned above.)
- Runs bower:install (Triggered on the
License
MIT
10 years ago