在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):slushjs/gulp-install开源软件地址(OpenSource Url):https://github.com/slushjs/gulp-install开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):gulp-install
It will run the command in the directory it finds the file, so if you have configs nested in a lower directory than your NOTE since Primary objectiveUsed as the install step when using InstallationFor global use with slushInstall npm install --save gulp-install For local use with gulpInstall npm install --save-dev gulp-install Usage
In your |
Param | Type | Description |
---|---|---|
options | Object |
Any option |
callback | Function |
Called when install is finished (not on failures) |
To not trigger the install use --skip-install
as CLI parameter when running slush
or gulp
.
<command>
Type: Array|String|Object
Default: null
Use this option(s) to specify any arguments for any command, e.g:
var install = require("gulp-install");
gulp.src(__dirname + '/templates/**')
.pipe(gulp.dest('./'))
.pipe(install({
npm: '--production', // Either a single argument as a string
bower: {allowRoot: true}, // Or arguments as an object (transformed using Dargs: https://www.npmjs.com/package/dargs)
pip: ['--target', '.'] // Or arguments as an array
}));
Type: Object
Default: null
Use this option to add any command to be run for any file, e.g:
var install = require("gulp-install");
gulp.src(__dirname + '/templates/**')
.pipe(gulp.dest('./'))
.pipe(install({
commands: {
'package.json': 'yarn'
},
yarn: ['--extra', '--args', '--here']
}));
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}));
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}));
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}));
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}));
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
));
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论