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


TypeScript gulpclass.Task函數代碼示例

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


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

示例1: unit

 /**
  * Runs unit-tests.
  */
 @Task()
 unit() {
     chai.should();
     chai.use(require("sinon-chai"));
     return gulp.src("./build/es5/test/unit/**/*.js")
         .pipe(mocha());
 }
開發者ID:IrieLabs,項目名稱:ngx-popover,代碼行數:10,代碼來源:gulpfile.ts

示例2: packagePublishNext

 /**
  * Publishes a package to npm from ./build/package directory with @next tag.
  */
 @Task()
 packagePublishNext() {
     return gulp.src("package.json", { read: false })
         .pipe(shell([
             "cd ./build/package && npm publish --tag next"
         ]));
 }
開發者ID:waltercassiano,項目名稱:typeorm,代碼行數:10,代碼來源:gulpfile.ts

示例3: npmPublish

 /**
  * Publishes a package to npm from ./build/package directory.
  */
 @Task()
 npmPublish() {
     return gulp.src("package.json", { read: false })
         .pipe(shell([
             "cd ./build/package && npm publish"
         ]));
 }
開發者ID:IrieLabs,項目名稱:ngx-popover,代碼行數:10,代碼來源:gulpfile.ts

示例4: compile

 /**
  * Runs typescript files compilation.
  */
 @Task()
 compile() {
     return gulp.src("package.json", { read: false })
         .pipe(shell([
             "\"node_modules/.bin/ngc\" -p tsconfig-aot.json"
         ]));
 }
開發者ID:IrieLabs,項目名稱:ngx-popover,代碼行數:10,代碼來源:gulpfile.ts

示例5: packageReplaceReferences

 /**
  * Removes /// <reference from compiled sources.
  */
 @Task()
 packageReplaceReferences() {
     return gulp.src("./build/package/**/*.d.ts")
         .pipe(replace(`/// <reference types="node" />`, ""))
         .pipe(replace(`/// <reference types="chai" />`, ""))
         .pipe(gulp.dest("./build/package"));
 }
開發者ID:waltercassiano,項目名稱:typeorm,代碼行數:10,代碼來源:gulpfile.ts

示例6: unit

 /**
  * Runs unit-tests.
  */
 @Task()
 unit() {
     chai.should();
     chai.use(require("sinon-chai"));
     chai.use(require("chai-as-promised"));
     return gulp.src("./build/compiled/test/**/*.js")
         .pipe(mocha());
 }
開發者ID:MagnusCloudCorp,項目名稱:class-validator,代碼行數:11,代碼來源:gulpfile.ts

示例7: del

    // -------------------------------------------------------------------------
    // General tasks
    // -------------------------------------------------------------------------

    /**
     * Cleans build folder.
     */
    @Task()
    clean(cb: Function) {
        return del([
            "build/**",
            "!build",
            "!build/package",
            "!build/package/node_modules",
            "!build/package/node_modules/**"
        ], cb);
    }
開發者ID:gitter-badger,項目名稱:class-validator,代碼行數:17,代碼來源:gulpfile.ts

示例8: tslint

    // -------------------------------------------------------------------------
    // Run tests tasks
    // -------------------------------------------------------------------------

    /**
     * Runs ts linting to validate source code.
     */
    @Task()
    tslint() {
        return gulp.src(["./src/**/*.ts", "./test/**/*.ts", "./sample/**/*.ts"])
            .pipe(tslint())
            .pipe(tslint.report(stylish, {
                emitError: true,
                sort: true,
                bell: true
            }));
    }
開發者ID:IrieLabs,項目名稱:ngx-popover,代碼行數:17,代碼來源:gulpfile.ts

示例9: coveragePost

 /**
  * Runs post coverage operations.
  */
 @Task("coveragePost", ["coveragePre"])
 coveragePost() {
     chai.should();
     chai.use(require("sinon-chai"));
     chai.use(require("chai-as-promised"));
     
     return gulp.src(["./build/es5/test/**/*.js"])
         .pipe(mocha())
         .pipe(istanbul.writeReports());
 }
開發者ID:gitter-badger,項目名稱:class-validator,代碼行數:13,代碼來源:gulpfile.ts

示例10: browserCopySources

    // -------------------------------------------------------------------------
    // Build and packaging for browser
    // -------------------------------------------------------------------------

    /**
     * Copies all source files into destination folder in a correct structure.
     */
    @Task()
    browserCopySources() {
        return gulp.src([
            "./src/**/*.ts",
            "!./src/commands/*.ts",
            "!./src/cli.ts",
            "!./src/typeorm.ts",
            "!./src/typeorm-model-shim.ts",
            "!./src/platform/PlatformTools.ts"
        ])
        .pipe(gulp.dest("./build/browser/src"));
    }
開發者ID:waltercassiano,項目名稱:typeorm,代碼行數:19,代碼來源:gulpfile.ts


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