New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

shipit-npm

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shipit-npm

Npm tasks for shipit.

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
165
decreased by-23.26%
Maintainers
1
Weekly downloads
 
Created
Source

shipit-npm

A set of tasks for Shipit used for npm specific tasks on deploy.

Inspired by the capistrano/composer extension.

Features:

  • Triggered on the updated or fetched event from shipit-deploy
  • Has a direct pass though task to npm cli
  • Works via shipit-cli and grunt-shipit

Install

npm install shipit-npm

Usage

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"

Options 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.

Example shipitfile.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 Args npm.installArgs or Flags npm.installFlags defined in options)
      • Emit event "npm_installed"
    • npm:run
      • Runs npm command.
Event flow:
  • on Event "deploy" (shipit-deploy initialized)
    • Runs npm:init
    • on Event "npm_inited"
      • Runs npm:install (Triggered on the updated or fetched event from shipit-deploy or by a custom npm.triggerEvent as mentioned above.)

License

MIT

Keywords

FAQs

Package last updated on 14 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc