當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。