本文整理汇总了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));
}
示例2: useref
@Task('useref')
useref() {
return gulp.src('app/*.html')
.pipe(useref())
.pipe(gulpIf('*.js', uglify()))
.pipe(gulpIf('*.css', cssnano()))
.pipe(gulp.dest('dist'))
}
示例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;
}
示例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'))
})
示例5: csso
() => {
return gulp.src(stylesSource)
.pipe(sass())
.pipe(gulpif(minify, csso()))
.pipe(gulp.dest(DEST_DIR));
}
示例6: uglify
() => {
return gulp.src(config.bootstrapSource)
.pipe(concat('bootstrap.js.dist'))
.pipe(gulpif(minify, uglify()))
.pipe(gulp.dest(APP_DIR + '/Resources/container-lib'));
}
示例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'));
});
示例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));
}
示例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));
}