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


TypeScript gulp-shell.task函數代碼示例

本文整理匯總了TypeScript中gulp-shell.task函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript task函數的具體用法?TypeScript task怎麽用?TypeScript task使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了task函數的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1:

gulp.task('npm', () =>
  shell.task(['npm prune'])
開發者ID:kgeorgieva,項目名稱:kristina-georgieva-angular2-site,代碼行數:2,代碼來源:gulpfile.ts

示例2: typescriptTask

    DIR_TMP,
    DIR_DST,
    DIR_SRC,
    copyHtmlTask,
    typescriptTask
} from './common.ts';

gulp.task('clean', del.bind(null, [DIR_TMP, DIR_DST]));

gulp.task('ts', () => typescriptTask());

gulp.task('copy.html', () => copyHtmlTask());

gulp.task('wcs', shell.task([
  `web-component-shards \
    -r ${DIR_TMP} \
    -e ${getShards().join(' ')}`
]));

gulp.task('htmlmin', () => {
  return gulp.src(`${path.join(DIR_TMP, DIR_DST)}/**/*.html`)
    .pipe(htmlmin(htmlminOptions))
    .pipe(gulp.dest(DIR_DST));
});

gulp.task('gzip', () => {
  return gulp.src(`${DIR_DST}/**/*.{html,js,css,svg}`)
    .pipe(gzip({gzipOptions: {level: 6}, threshold: '1kb'}))
    .pipe(gulp.dest(DIR_DST));
});
開發者ID:Farata,項目名稱:polymer-typescript-starter,代碼行數:30,代碼來源:gulpfile-prod.ts

示例3: merge

	

	if(minify) {
		js = js.pipe(uglify());
	}
	
	js = js
		.pipe(sourcemaps.write("./"))
		.pipe(gulp.dest("./"));

	return merge([dts, js]);
});


gulp.task('coverage', ['compile'], shell.task([
  "ts-node node_modules/istanbul/lib/cli.js cover node_modules/mocha/bin/_mocha test/*.ts"
]));


gulp.task("typedoc", function() {
	return gulp.src(["src/*.ts"])
		.pipe(typedoc({
			module: "commonjs",
			out: "./doc",
			theme: "minimal",
			name: "Updraft",
			target: "es5",
			mode: "file",
			includeDeclarations: true
		}));
});
開發者ID:arolson101,項目名稱:updraft,代碼行數:29,代碼來源:Gulpfile.ts

示例4: require

ďťż/// <reference path="../_references.ts" />

'use strict';

import gulp = require("gulp");
var sequence: Function = require("run-sequence");
var connect: any = require("gulp-connect");
var shell: any = require("gulp-shell");

var targetConf: string = "../kspRemoteTechPlannerTest/conf.js";
var targetRoot: string = "../kspRemoteTechPlanner/";
var targetMinifiedRoot: string = "../deploy";

gulp.task("test:wdm-update",
    shell.task("webdriver-manager update")
    );

gulp.task("test:server-start",() => {
    connect.server({
        root: targetRoot,
        port: 8080
    });
});

gulp.task("test-minified:server-start",() => {
    connect.server({
        root: targetMinifiedRoot,
        port: 8080
    });
});
開發者ID:ryohpops,項目名稱:kspRemoteTechPlanner,代碼行數:30,代碼來源:test.ts

示例5: runSequence

gulp.task('task:build', done => runSequence(
  'task:compile',
  'task:deploy:prep',
  done
))

gulp.task('task:compile', done => runSequence(
  'task:compile:angular',
  'task:compile:rollup',
  'task:compile:downlevel',
  done
));

gulp.task('task:compile:angular', shell.task([
  'node_modules/.bin/ngc'
]));

gulp.task('task:compile:rollup', done => {
  rollup
    .rollup({
      entry: 'tmp/ngc/app/main.js',
      plugins: [
        new RxRewriter(),
        rollupResolveNode({
          jsnext: true,
          main: true,
          extensions: ['.js'],
          preferBuiltins: false
        })
      ]
開發者ID:angular,項目名稱:mobile-codelab,代碼行數:30,代碼來源:gulpfile.ts

示例6:

gulp.task("tsconfig", () => {
    return gulp
        .src([
            "./lib/**/*.ts",
            "!./lib/**/*.d.ts",
            "./test/**/*.ts",
            "!./test/**/*.d.ts",
            "./typings/**/*.ts",
            "./node_modules/commandpost/commandpost.d.ts",
            "./node_modules/typescript/lib/lib.es6.d.ts"
        ])
        .pipe(tsconfig());
});

gulp.task("tsc", shell.task([
    "node_modules/.bin/tsc -p ./"
]));

gulp.task("tslint", () => {
    return gulp
        .src([
            "./lib/**/*.ts",
            "./test/**/*.ts"
        ])
        .pipe(tslint({
            config: "/tslint.json"
        }))
        .pipe(tslint.report("verbose"));
});

gulp.task("espower", () => {
開發者ID:HansS,項目名稱:typescript-project-sample-vvakame,代碼行數:31,代碼來源:gulpfile.ts


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