当前位置: 首页>>代码示例>>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;未经允许,请勿转载。