本文整理匯總了TypeScript中gulp-install類的典型用法代碼示例。如果您正苦於以下問題:TypeScript gulp-install類的具體用法?TypeScript gulp-install怎麽用?TypeScript gulp-install使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了gulp-install類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
/// <reference path="gulp-install.d.ts" />
/// <reference path="../gulp/gulp.d.ts" />
import * as gulp from 'gulp';
import * as install from 'gulp-install';
// Examples taken from https://www.npmjs.com/package/gulp-install
// Usage in a gulp stream
gulp.src('src')
.pipe(install());
// Options
install({
production: true,
ignoreScripts: true,
noOptional: true,
allowRoot: true,
args: ['one', 'two', 'three']
});
// Options: args only as a string
install({
args: 'one'
});
示例2: installDeps
export function installDeps() {
return src('package.json')
.pipe(dest('.'))
.pipe(install({
args: '--progress=false'
}));
}
示例3:
gulp.task('install', () => gulp.src('./dist/package.json').pipe(install({ production: true })));
示例4:
gulp.task("release-install", ["copy-all"], () => {
return gulp.src(['./_dist/package.json'])
.pipe(install({production: true}));
});