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


TypeScript gulpclass.MergedTask函數代碼示例

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


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

示例1: compileBundles

    // -------------------------------------------------------------------------
    // Packaging and Publishing tasks
    // -------------------------------------------------------------------------

    /**
     * Compiles and compiles bundles.
     */
    @MergedTask()
    compileBundles() {
        const amdTsProject = ts.createProject("tsconfig.json", {
            module: "amd",
            outFile: packageName + ".amd.js",
            typescript: require("typescript")
        });
        const systemTsProject = ts.createProject("tsconfig.json", {
            module: "system",
            outFile: packageName + ".system.js",
            typescript: require("typescript")
        });
        const amdPureTsProject = ts.createProject("tsconfig.json", {
            module: "amd",
            outFile: packageName + ".pure.amd.js",
            noEmitHelpers: true,
            noImplicitUseStrict: true,
            typescript: require("typescript")
        });
        const systemPureTsProject = ts.createProject("tsconfig.json", {
            module: "system",
            outFile: packageName + ".pure.system.js",
            noEmitHelpers: true,
            noImplicitUseStrict: true,
            typescript: require("typescript")
        });

        return [
            gulp.src("build/bundle/**/*.ts")
                .pipe(amdTsProject()).js
                .pipe(gulp.dest("build/package")),
            
            gulp.src("build/bundle/**/*.ts")
                .pipe(systemTsProject()).js
                .pipe(gulp.dest("build/package")),

            gulp.src("build/bundle/**/*.ts")
                .pipe(amdPureTsProject()).js
                .pipe(gulp.dest("build/package")),
            
            gulp.src("build/bundle/**/*.ts")
                .pipe(systemPureTsProject()).js
                .pipe(gulp.dest("build/package"))
        ];
    }
開發者ID:pleerock,項目名稱:ng2-loading-bar,代碼行數:52,代碼來源:gulpfile.ts

示例2: browserCompile

    @MergedTask()
    browserCompile() {
        const tsProject = ts.createProject("tsconfig.json", {
            module: "es2015",
            "lib": ["es5", "es6", "dom"],
            typescript: require("typescript")
        });
        const tsResult = gulp.src(["./build/browser/src/**/*.ts", "./node_modules/reflect-metadata/**/*.d.ts", "./node_modules/@types/**/*.ts"])
            .pipe(sourcemaps.init())
            .pipe(tsProject());

        return [
            tsResult.dts.pipe(gulp.dest("./build/package/browser")),
            tsResult.js
                .pipe(sourcemaps.write(".", { sourceRoot: "", includeContent: true }))
                .pipe(gulp.dest("./build/package/browser"))
        ];
    }
開發者ID:waltercassiano,項目名稱:typeorm,代碼行數:18,代碼來源:gulpfile.ts

示例3: packageCompile

    /**
     * Copies all sources to the package directory.
     */
    @MergedTask()
    packageCompile() {
        const tsProject = ts.createProject("tsconfig.json", {
            typescript: require("typescript")
        });
        const tsResult = gulp.src([
            "./src/**/*.ts",
            "./node_modules/@types/**/*.ts",
        ])
            .pipe(sourcemaps.init())
            .pipe(tsProject());

        return [
            tsResult.dts.pipe(gulp.dest("./build/package")),
            tsResult.js
                .pipe(sourcemaps.write(".", { sourceRoot: "", includeContent: true }))
                .pipe(gulp.dest("./build/package"))
        ];
    }
開發者ID:typeorm,項目名稱:typeorm,代碼行數:22,代碼來源:gulpfile.ts

示例4: uglify

    /**
     * Uglifys bundles.
     */
    @MergedTask()
    uglify() {
        return [
            gulp.src(`./build/package/${packageName}.pure.amd.js`)
                .pipe(uglify())
                .pipe(rename(`${packageName}.pure.amd.min.js`))
                .pipe(gulp.dest("./build/package")),

            gulp.src(`./build/package/${packageName}.pure.system.js`)
                .pipe(uglify())
                .pipe(rename(`${packageName}.pure.system.min.js`))
                .pipe(gulp.dest("./build/package")),

            gulp.src(`./build/package/${packageName}.amd.js`)
                .pipe(uglify())
                .pipe(rename(`${packageName}.amd.min.js`))
                .pipe(gulp.dest("./build/package")),

            gulp.src(`./build/package/${packageName}.system.js`)
                .pipe(uglify())
                .pipe(rename(`${packageName}.system.min.js`))
                .pipe(gulp.dest("./build/package")),
        ];
    }
開發者ID:IrieLabs,項目名稱:ngx-popover,代碼行數:27,代碼來源:gulpfile.ts

示例5: uglify

    /**
     * Uglifys bundles.
     */
    @MergedTask()
    uglify() {
        return [
            gulp.src(`./build/package/class-transformer.pure.amd.js`)
                .pipe(uglify())
                .pipe(rename(`class-transformer.pure.amd.min.js`))
                .pipe(gulp.dest("./build/package")),

            gulp.src(`./build/package/class-transformer.pure.system.js`)
                .pipe(uglify())
                .pipe(rename(`class-transformer.pure.system.min.js`))
                .pipe(gulp.dest("./build/package")),

            gulp.src(`./build/package/class-transformer.amd.js`)
                .pipe(uglify())
                .pipe(rename(`class-transformer.amd.min.js`))
                .pipe(gulp.dest("./build/package")),

            gulp.src(`./build/package/class-transformer.system.js`)
                .pipe(uglify())
                .pipe(rename(`class-transformer.system.min.js`))
                .pipe(gulp.dest("./build/package")),
        ];
    }
開發者ID:MagnusCloudCorp,項目名稱:class-transformer,代碼行數:27,代碼來源:gulpfile.ts

示例6: MergedTask

 export function MergedTask(metaArgs?: TaskMetadataArgs | string): Function {
   const args = parseMetaArgs(metaArgs);
   return gulpclass.MergedTask(args.name);
 }
開發者ID:shlomiassaf,項目名稱:ng2-chess,代碼行數:4,代碼來源:gulpclass.ts


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