本文整理汇总了TypeScript中gulp.dest函数的典型用法代码示例。如果您正苦于以下问题:TypeScript dest函数的具体用法?TypeScript dest怎么用?TypeScript dest使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dest函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
gulp.task('build:client:styles', () =>
gulp.src('./src/client/app/init.css')
.pipe(isProduction
? (cssnano as any)()
: gutil.noop())
.pipe(gulp.dest('./built/client/assets/'))
示例2: require
/** Tests taken from https://github.com/pgilad/gulp-sort#usage */
import * as gulp from 'gulp';
import sort = require('gulp-sort');
import * as gulpUtil from 'gulp-util';
// default sort
gulp.src('./src/js/**/*.js')
.pipe(sort())
.pipe(gulp.dest('./build/js'));
// pass in a custom comparator function
gulp.src('./src/js/**/*.js')
.pipe(sort(customComparator))
.pipe(gulp.dest('./build/js'));
// sort descending
gulp.src('./src/js/**/*.js')
.pipe(sort({
asc: false
}))
.pipe(gulp.dest('./build/js'));
// sort with a custom comparator
gulp.src('./src/js/**/*.js')
.pipe(sort({
comparator: function(file1, file2) {
if (file1.path.indexOf('build') > -1) {
return 1;
}
if (file2.path.indexOf('build') > -1) {
示例3:
gulp.task('copy_license', () => buildUtils.getAllModules().reduce((stream, mod: string) => stream.pipe(gulp.dest(`dist/${mod}`)), gulp.src('LICENSE')));
示例4:
gulp.task('somename', () => {
return gulp.src('client/**/*.js')
.pipe(minify())
.pipe(gulp.dest('build'));
});
示例5:
gulp.task('default', () =>
gulp.src('fixture.js')
.pipe(size())
.pipe(gulp.dest('dist'))
示例6: function
gulp.task('default', function () {
return gulp.src('src/app.js')
.pipe(stripDebug())
.pipe(gulp.dest('dist'));
});
示例7: packageReadmeFile
/**
* This task will replace all typescript code blocks in the README (since npm does not support typescript syntax
* highlighting) and copy this README file into the package folder.
*/
@Task()
packageReadmeFile() {
return gulp.src("./README.md")
.pipe(replace(/```typescript([\s\S]*?)```/g, "```javascript$1```"))
.pipe(gulp.dest("./build/package"));
}
示例8: copyTypingsFile
/**
* This task will copy typings.json file to the build package.
*/
@Task()
copyTypingsFile() {
return gulp.src("./typings.json")
.pipe(gulp.dest("./build/package"));
}
示例9: packageFiles
/**
* Copies all files that will be in a package.
*/
@Task()
packageFiles() {
return gulp.src("./build/es5/src/**/*")
.pipe(gulp.dest("./build/package"));
}