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


TypeScript gulp-if.default函数代码示例

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


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

示例1: html2js

    () => {

        var filename = debuggerIndexFile,
            filePath = path.resolve(__dirname, filename),
            source = fs.readFileSync(filePath, 'utf8');

        var tpl = html2js(source, {
            mode: 'default',
            wrap: false
        });

        return gulp.src(SOURCE_DIR + '/' + DEBUGGER_NAMESPACE + '/debug.js')
            .pipe(template({
                template: tpl
            }))
            .pipe(gulpif(minify, uglify()))
            .pipe(gulpif(env === 'dev', replace(/##host##/g, `${baseUrl}container-debugger`)))
            .pipe(gulp.dest(DEST_DIR + '/' + DEBUGGER_NAMESPACE));

    }
开发者ID:lindsaymacvean,项目名称:seventag,代码行数:20,代码来源:Gulpfile.ts

示例2: useref

 @Task('useref')
 useref() {
     return gulp.src('app/*.html')
         .pipe(useref())
         .pipe(gulpIf('*.js', uglify()))
         .pipe(gulpIf('*.css', cssnano()))
         .pipe(gulp.dest('dist'))
 }
开发者ID:pgalias,项目名称:hexagon,代码行数:8,代码来源:gulpclass.ts

示例3: createStream

 /**
  * See: GulpTask::createStream().
  *
  * @param {GulpfileInputConfiguration[]} inputs
  *
  * @returns {object}
  */
 protected createStream(inputs: GulpfileInputConfiguration[]): any {
     const env = this.gulpfile.options.env;
     const stream: any = super.createStream(inputs);
     if (stream !== null) {
         return stream
             .pipe(gulpif(env === 'dev', sourcemaps.init()))
             .pipe(gulpif(env === 'prod', uglifycss()))
             .pipe(gulpif(env === 'dev', relativeSourcesmaps({dest: 'tmp'})))
             .pipe(concat(FileSystem.getRelativePath(FileSystem.getDirectoryName(this.outputPath), this.outputPath)))
             .pipe(gulpif(env === 'dev', sourcemaps.write()))
             .pipe(this.gulpfile.gulp.dest(FileSystem.getDirectoryName(this.outputPath)));
     }
     return null;
 }
开发者ID:Stnaire,项目名称:gulp-yaml-packages,代码行数:21,代码来源:StylesTask.ts

示例4: newer

gulp.task("scripts:coffee", () => {
  return gulp.src('./src/coffee/**/*.coffee')
    .pipe(gulpif(argv.incremental, newer({dest: paths.buildDir.jsTree, ext: '.js'})))
    .pipe(coffee({bare: true}))
    .pipe(rename((path) => path.extname = '.ts'))
    .pipe(gulp.dest(paths.buildDir.jsTree + '_ts'))
})
开发者ID:bgyarfas,项目名称:bokeh,代码行数:7,代码来源:scripts.ts

示例5: csso

    () => {

        return gulp.src(stylesSource)
            .pipe(sass())
            .pipe(gulpif(minify, csso()))
            .pipe(gulp.dest(DEST_DIR));

    }
开发者ID:lindsaymacvean,项目名称:seventag,代码行数:8,代码来源:Gulpfile.ts

示例6: uglify

    () => {

        return gulp.src(config.bootstrapSource)
            .pipe(concat('bootstrap.js.dist'))
            .pipe(gulpif(minify, uglify()))
            .pipe(gulp.dest(APP_DIR + '/Resources/container-lib'));

    }
开发者ID:lindsaymacvean,项目名称:seventag,代码行数:8,代码来源:Gulpfile.ts

示例7: notify

 gulp.task('TypeScript compilation', () => {
   return gulp
     .src(['**/*.ts', '!node_modules/**/*.ts'], { base: '.' })
     .pipe(ts(tsConfig.compilerOptions))
     .pipe(gulpif(params.env !== 'production', notify({
       title: 'TypeScript compiled',
       message: 'Thank you for being progressive!',
       icon: path.join(__dirname, 'icons/gulp/ts.png'),
       onLast: true
     })))
     .pipe(gulp.dest('./dist'));
 });
开发者ID:SlimDogs,项目名称:bender-slack-bot,代码行数:12,代码来源:gulpfile.ts

示例8: templatesJadeBuild

    () => {

        return templatesJadeBuild(indexSource)
            .pipe(gulpif(env === 'dev', gulp.dest(DEST_DIR + '/' + ADMIN_NAMESPACE)))
            .pipe(rename('index.php'))
            .pipe(htmlreplace({
                'pluginsjstop' : '<?php $pathTop = __DIR__.\'/../../var/cache/seventagPluginsJavascriptTop.php\'; if(is_file($pathTop)) { require_once $pathTop; } ?>',
                'pluginsjsbottom' : '<?php $pathBottom = __DIR__.\'/../../var/cache/seventagPluginsJavascriptBottom.php\'; if(is_file($pathBottom)) { require_once $pathBottom; } ?>',
                'oauthsettings' : '<?php $path = __DIR__.\'/../../var/cache/OAuthClientSettings.php\'; if(is_file($path)) { require_once $path; } ?>'
            }))
            .pipe(gulp.dest(DEST_DIR + '/' + ADMIN_NAMESPACE));

    }
开发者ID:lindsaymacvean,项目名称:seventag,代码行数:13,代码来源:Gulpfile.ts

示例9: wiredep

    () => {

        let bowerDeps = wiredep({
            dependencies: true,
            devDependencies: env !== 'prod'
        });

        return gulp.src(bowerDeps.js, {base: 'bower_components'})
            .pipe(concat('vendor.js'))
            .pipe(gulpif(minify, uglify().on('error', gutil.log)))
            .pipe(gulp.dest(DEST_DIR + '/' + DEBUGGER_NAMESPACE));

    }
开发者ID:lindsaymacvean,项目名称:seventag,代码行数:13,代码来源:Gulpfile.ts


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