本文整理匯總了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));
}