A set of tasks for Shipit used for npm specific tasks on deploy.
Inspired by the capistrano/composer extension.
Features:
updated
or fetched
event from shipit-deploynpm install shipit-npm
Just simply run: (This triggers the npm
task on the deploy updated
or fetched
event. No additional config necessary.)
shipit staging deploy
Or you can run the tasks separatly :
shipit staging npm:init npm:install
shipit staging npm:run --cmd "update"
shipit.config.npm
npm.remote
Type: Boolean
Default: true
A Boolean to determine whether to run the task in local workspace or on the remote.
npm.installArgs
Type: Array
or String
Default: []
An array or string specifying npm args passed to the npm install cmd.
npm.installFlags
Type: Array
or String
Default: []
An array or string specifying npm flags passed to the npm install cmd.
npm.triggerEvent
Type: String
,Boolean
Default: updated
or fetched
(depending on npm.remote
value)
An event name that triggers npm:install
. Can be set to false to prevent the npm:install
task from listening to any events.
shipitfile.js
options usagemodule.exports = function (shipit) {
require('shipit-deploy')(shipit);
require('shipit-npm')(shipit);
shipit.initConfig({
default: {
npm: {
remote: false,
installArgs: ['gulp'],
installFlags: ['-g']
}
}
});
};
npm.installArgs
or Flags npm.installFlags
defined in options)updated
or fetched
event from shipit-deploy or by a custom npm.triggerEvent
as mentioned above.)MIT