Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Npm tasks for shipit.

License

NotificationsYou must be signed in to change notification settings

callerc1/shipit-npm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A set of tasks forShipit used fornpm specific tasks on deploy.

Inspired by thecapistrano/composer extension.

Features:

Install

npm install shipit-npm

Usage

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"

Optionsshipit.config.npm

npm.remote

Type:BooleanDefault:true

A Boolean to determine whether to run the task in local workspace or on the remote.

npm.installArgs

Type:Array orStringDefault: []

An array or string specifying npm args passed to thenpm install cmd.

npm.installFlags

Type:Array orStringDefault: []

An array or string specifying npm flags passed to thenpm install cmd.

npm.triggerEvent

Type:String,BooleanDefault: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.

Exampleshipitfile.js options usage

module.exports=function(shipit){require('shipit-deploy')(shipit);require('shipit-npm')(shipit);shipit.initConfig({default:{npm:{remote:false,installArgs:['gulp'],installFlags:['-g']}}});};

Workflow tasks

  • npm
    • npm:init
      • Emit event "npm_inited".
    • npm:install
      • Runs npm install (with any Argsnpm.installArgs or Flagsnpm.installFlags defined in options)
      • Emit event "npm_installed"
    • npm:run
      • Runs npm command.
Event flow:
  • on Event "deploy" (shipit-deploy initialized)
    • Runsnpm:init
    • on Event "npm_inited"
      • Runsnpm:install (Triggered on theupdated orfetched event fromshipit-deploy or by a customnpm.triggerEvent as mentioned above.)

License

MIT

About

Npm tasks for shipit.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp