- Notifications
You must be signed in to change notification settings - Fork12
callerc1/shipit-npm
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A set of tasks forShipit used fornpm specific tasks on deploy.
Inspired by thecapistrano/composer extension.
Features:
- Triggered on the
updated
orfetched
event fromshipit-deploy - Has a direct pass though task tonpm cli
- Works viashipit-cli andgrunt-shipit
npm install shipit-npm
Just simply run: (This triggers thenpm
task on the deployupdated
orfetched
event. No additional config necessary.)
shipit staging deploy
Or you can run the tasks separatly :
shipit staging npm:init npm:installshipit staging npm:run --cmd "update"
Type:Boolean
Default:true
A Boolean to determine whether to run the task in local workspace or on the remote.
Type:Array
orString
Default: []
An array or string specifying npm args passed to thenpm install cmd.
Type:Array
orString
Default: []
An array or string specifying npm flags passed to thenpm install cmd.
Type:String
,Boolean
Default:updated
orfetched
(depending onnpm.remote
value)
An event name that triggersnpm:install
. Can be set to false to prevent thenpm:install
task from listening to any events.
module.exports=function(shipit){require('shipit-deploy')(shipit);require('shipit-npm')(shipit);shipit.initConfig({default:{npm:{remote:false,installArgs:['gulp'],installFlags:['-g']}}});};
- npm
- npm:init
- Emit event "npm_inited".
- npm:install
- Runs npm install (with any Args
npm.installArgs
or Flagsnpm.installFlags
defined in options) - Emit event "npm_installed"
- Runs npm install (with any Args
- npm:run
- Runs npm command.
- npm:init
- on Event "deploy" (shipit-deploy initialized)
- Runsnpm:init
- on Event "npm_inited"
- Runsnpm:install (Triggered on the
updated
orfetched
event fromshipit-deploy or by a customnpm.triggerEvent
as mentioned above.)
- Runsnpm:install (Triggered on the
MIT