当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript gulp4.dest函数代码示例

本文整理汇总了TypeScript中gulp4.dest函数的典型用法代码示例。如果您正苦于以下问题:TypeScript dest函数的具体用法?TypeScript dest怎么用?TypeScript dest使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dest函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: rebundleRelease

 function rebundleRelease(bundleStream) {
     return bundleStream.bundle()
         .pipe(source('main.js'))
         .pipe(streamify(uglify(smildSettings.uglifyjs)))
         .pipe(buffer())
         .pipe(gulp.dest(helper.getTempFolder() + '/js'));
 }
开发者ID:mtfranchetto,项目名称:smild,代码行数:7,代码来源:Browserify.ts

示例2: bundleRelease

 function bundleRelease(stream) {
     return stream
         .pipe(concat('main.css'))
         .pipe(applySass())
         .pipe(autoprefixer({browsers: settings.autoprefixer}))
         .pipe(minify())
         .pipe(gulp.dest(helper.getTempFolder() + '/css'));
 }
开发者ID:mtfranchetto,项目名称:smild,代码行数:8,代码来源:Styles.ts

示例3: Revision

export default function Revision() {
    let settings = helper.getSettings();
    if (!helper.isRelease()) return Promise.resolve();
    if (settings.revisionExclude === "*") {
        return gulp.src(helper.getTempFolder() + '/**')
            .pipe(gulp.dest(helper.getDistFolder()));
    }
    let excludedFiles = _.union(
        ['favicon.ico', 'index.html'],
        _.map(settings.revisionExclude, (rule: any) => rule.regexp ? new RegExp(rule.pattern) : rule.pattern));
    return gulp.src(helper.getTempFolder() + '/**')
        .pipe(RevAll.revision({
            dontRenameFile: excludedFiles,
            dontUpdateReference: excludedFiles,
            dontSearchFile: [/.*\.pdf/]
        }))
        .pipe(gulp.dest(helper.getDistFolder()));
}
开发者ID:mtfranchetto,项目名称:smild,代码行数:18,代码来源:Revision.ts

示例4: Scaffolding

export default function Scaffolding() {
    let name = helper.getCurrentTarget();
    if (!name) {
        return Promise.reject(new Error("Missing required project name"));
    }
    let projectPath = path.resolve(__dirname, "../../scaffolding", helper.getProjectType());
    return gulp.src(projectPath + '/**/*')
        .pipe(replace("$$NAME", name))
        .pipe(gulp.dest(`./${name}`));
}
开发者ID:mtfranchetto,项目名称:smild,代码行数:10,代码来源:Scaffolding.ts

示例5: Typescript

export default function Typescript() {
    let settings = helper.getSettings(),
        tsProject = ts.createProject("tsconfig.json", {typescript: require(settings.typescriptPath)});

    return gulp.src(settings.scripts)
        .pipe(tsProject())
        .on("error", function (error) {
            if (!helper.isWatching())
                process.exit(1);
        })
        .pipe(gulp.dest(settings.distribution));
}
开发者ID:mtfranchetto,项目名称:smild,代码行数:12,代码来源:Typescript.ts

示例6: bundleDevelopment

 function bundleDevelopment(stream) {
     return stream
         .pipe(sourcemaps.init())
         .pipe(concat('main.css'))
         .pipe(applySass())
         .pipe(autoprefixer({browsers: settings.autoprefixerRules}))
         .pipe(sourcemaps.write())
         .pipe(gulp.dest(helper.getDistFolder() + '/css'))
         .pipe(refresh({
             start: helper.isWatching(),
             port: settings.liveReloadPort
         }));
 }
开发者ID:mtfranchetto,项目名称:smild,代码行数:13,代码来源:Styles.ts

示例7: rebundleDevelopment

 function rebundleDevelopment(bundleStream) {
     let bundle = bundleStream.bundle();
     if (buildHelper.isWatching())
         bundle = bundle.on('error', function (err) {
             console.error(err.message);
             this.emit("end");
         });
     return bundle
         .pipe(source('main.js'))
         .pipe(transform(() => {
             return exorcist(helper.getTempFolder() + '/js/main.map.js');
         }))
         .pipe(gulp.dest(helper.getTempFolder() + '/js'))
         .pipe(refresh({
             start: helper.isWatching(),
             port: smildSettings.liveReloadPort
         }));
 }
开发者ID:mtfranchetto,项目名称:smild,代码行数:18,代码来源:Browserify.ts

示例8: Images

export default function Images() {
    let settings = helper.getSettings();
    return gulp.src(settings.images + '/**/*')
        .pipe(gulp.dest(path.join(helper.getTempFolder(), settings.images)));
}
开发者ID:mtfranchetto,项目名称:smild,代码行数:5,代码来源:Images.ts

示例9: CopyIndex

export default function CopyIndex() {
    let stream = gulp.src('index.html');
    if (helper.isWatching())
        stream = stream.pipe(embedlr({ port: helper.getSettings().liveReloadPort}));
    return stream.pipe(gulp.dest(helper.getTempFolder()));
}
开发者ID:mtfranchetto,项目名称:smild,代码行数:6,代码来源:CopyIndex.ts


注:本文中的gulp4.dest函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。