Code Monkey home page Code Monkey logo

gulp-install's Introduction

gulp-install NPM version Build Status Dependency Status

Automatically install npm, bower, tsd, and pip packages/dependencies if the relative configurations are found in the gulp file stream respectively

File Found Command run
package.json npm install
bower.json bower install
tsd.json tsd install
requirements.txt pip install -r requirements.txt

It will run the command in the directory it finds the file, so if you have configs nested in a lower directory than your slushfile.js/gulpfile.js, this will still work.

Primary objective

Used as the install step when using slush as a Yeoman replacement.

Installation

For global use with slush

Install gulp-install as a dependency:

npm install --save gulp-install

For local use with gulp

Install gulp-install as a development dependency:

npm install --save-dev gulp-install

Usage

In your slushfile.js:

var install = require("gulp-install");

gulp.src(__dirname + '/templates/**')
  .pipe(gulp.dest('./'))
  .pipe(install());

In your gulpfile.js:

var install = require("gulp-install");

gulp.src(['./bower.json', './package.json'])
  .pipe(install());

Options

To not trigger the install use --skip-install as CLI parameter when running slush or gulp.

options.production

Type: Boolean

Default: false

Set to true if npm install should be appended with the --production parameter when stream contains package.json.

Example:

var install = require("gulp-install");

gulp.src(__dirname + '/templates/**')
  .pipe(gulp.dest('./'))
  .pipe(install({production: true}));  

options.ignoreScripts

Type: Boolean

Default: false

Set to true if npm install should be appended with the --ignore-scripts parameter when stream contains package.json. Useful for skipping postinstall scripts with npm.

Example:

var install = require("gulp-install");

gulp.src(__dirname + '/templates/**')
  .pipe(gulp.dest('./'))
  .pipe(install({ignoreScripts: true}));

options.noOptional

Type: Boolean

Default: false

Set to true if npm install should be appended with the --no-optional parameter which will prevent optional dependencies from being installed.

Example:

var install = require("gulp-install");

gulp.src(__dirname + '/templates/**')
  .pipe(gulp.dest('./'))
  .pipe(install({noOptional: true}));

options.allowRoot

Type: Boolean

Default: false

Set to true if bower install should be appended with the --allow-root parameter when stream contains bower.json.

Example:

var install = require("gulp-install");

gulp.src(__dirname + '/templates/**')
  .pipe(gulp.dest('./'))
  .pipe(install({allowRoot: true}));  

options.args

Type: Array or String

Default: undefined

Specify additional arguments that will be passed to the install command(s).

Example:

var install = require("gulp-install");

gulp.src(__dirname + '/templates/**')
  .pipe(gulp.dest('./'))
  .pipe(install({
      args: ['dev', '--no-shrinkwrap' ]} // npm install --dev --no-shrinkwrap
    ));  

License

MIT License

gulp-install's People

Contributors

floatdrop avatar futurechan avatar igorgoldny avatar jgr3go avatar joakimbeng avatar peterjuras avatar real-alexei avatar remojansen avatar safareli avatar shiwano avatar smcelhinney avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.