本文整理汇总了TypeScript中gulp-template.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了default函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: cb
], answers => {
if (!answers.good) { return cb(); }
answers.camel = Util.camelize(answers.service);
answers.mod = Util.classable(answers.camel);
gulp.src(path.join(__dirname, 'templates/options/service/service.ts'))
.pipe(template(answers))
.pipe(rename(file => { file.basename = answers.camel; }))
.pipe(conflict(path.join(process.cwd(), 'src/shared')))
.pipe(gulp.dest(path.join(process.cwd(), 'src/shared')))
.on('finish', () => { cb(); }).resume();
});
示例3: filter
], answers => {
if (!answers.good) { return cb(); }
answers.camel = Util.camelize(answers.project);
answers.slug = Util.slugify(answers.project);
path.resolve(process.cwd(), answers.slug);
let img = filter(['**/**', '!**/**.{ico,png}'], {restore: true});
gulp.src(path.join(__dirname, 'templates/app/**'))
.pipe(img)
.pipe(template(answers))
.pipe(img.restore)
.pipe(conflict(path.join(process.cwd(), answers.slug)))
.pipe(gulp.dest(path.join(process.cwd(), answers.slug)))
.pipe(install())
.on('finish', () => { cb(); }).resume();
});