當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript gulp.dest函數代碼示例

本文整理匯總了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/'))
開發者ID:ha-dai,項目名稱:Misskey,代碼行數:6,代碼來源:gulpfile.ts

示例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) {
開發者ID:AlexGalays,項目名稱:DefinitelyTyped,代碼行數:31,代碼來源:gulp-sort-tests.ts

示例3:

gulp.task('copy_license', () => buildUtils.getAllModules().reduce((stream, mod: string) => stream.pipe(gulp.dest(`dist/${mod}`)), gulp.src('LICENSE')));
開發者ID:JohnGorter,項目名稱:universal,代碼行數:1,代碼來源:gulpfile.ts

示例4:

gulp.task('somename', () => {
    return gulp.src('client/**/*.js')
        .pipe(minify())
        .pipe(gulp.dest('build'));
});
開發者ID:CNBoland,項目名稱:DefinitelyTyped,代碼行數:5,代碼來源:index.ts

示例5:

gulp.task('default', () =>
    gulp.src('fixture.js')
        .pipe(size())
        .pipe(gulp.dest('dist'))
開發者ID:0815fox,項目名稱:DefinitelyTyped,代碼行數:4,代碼來源:gulp-size-tests.ts

示例6: function

gulp.task('default', function () {
	return gulp.src('src/app.js')
		.pipe(stripDebug())
		.pipe(gulp.dest('dist'));
});
開發者ID:0815fox,項目名稱:DefinitelyTyped,代碼行數:5,代碼來源:gulp-strip-debug-tests.ts

示例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"));
 }
開發者ID:eswarchennupati,項目名稱:gulpclass,代碼行數:10,代碼來源:gulpfile.ts

示例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"));
 }
開發者ID:eswarchennupati,項目名稱:gulpclass,代碼行數:8,代碼來源:gulpfile.ts

示例9: packageFiles

 /**
  * Copies all files that will be in a package.
  */
 @Task()
 packageFiles() {
     return gulp.src("./build/es5/src/**/*")
         .pipe(gulp.dest("./build/package"));
 }
開發者ID:eswarchennupati,項目名稱:gulpclass,代碼行數:8,代碼來源:gulpfile.ts


注:本文中的gulp.dest函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。