本文整理匯總了TypeScript中gulp-watch.default函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript default函數的具體用法?TypeScript default怎麽用?TypeScript default使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了default函數的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: sequence
export = gulp.task('watch', () => {
const queue = sequence(300);
// Html
watch(paths.sources.index, queue.getHandler('development:html', 'favicons'));
// Styles
watch(paths.sources.styles, () => gulp.start('development:styles'));
});
示例2: watch
() => {
watch(paths.src.ts,
() => {
gulp.start('ts');
});
watch(paths.src.js,
() => {
gulp.start('js');
});
watch(paths.src.files,
() => {
gulp.start('files');
});
});
示例3: indexDirectory
gulp.task('index-level-generators', ()=> {
const indexLevelGenerators = ()=> indexDirectory('level-generators', ['!*.js', '*.tests.js']);
indexLevelGenerators();
watch(['level-generators/**/*.js', '!level-generators/index.js'], ()=> {
indexLevelGenerators();
});
});
示例4: watch
gulp.task('watch', () => {
watch({name: 'typescript', emitOnGlob: false, glob: './app/**/*.ts'}, () => {
gulp.start('typescript');
});
watch({name: 'templates', emitOnGlob: false, glob: ['./app/**/*.html', '!./app/index.html']}, () => {
gulp.start('templates');
});
watch({name: 'stylus', emitOnGlob: false, glob: './app/**/*.styl'}, () => {
gulp.start('stylus');
});
watch({name: 'index', emitOnGlob: false, glob: './app/index.html'}, () => {
gulp.start('index');
});
});
示例5:
gulp.task('copy-assets', ['bump'], () =>
[
gulp.src(['**', '!**.js', '!{node_modules,node_modules/**}'])
.pipe(watch(['**', '!**.js', '!{node_modules,node_modules/**}']))
.pipe(plumber())
.pipe(gulp.dest(`../npm-link/${dirName}/`)),
gulp.src(['**', '!**.js', '!{node_modules,node_modules/**}'])
.pipe(gulp.dest(`../npm-link/${dirName}/`))
]
示例6: watch
gulp.task('jspm:watch', function() {
return watch(config.watch, {verbose: true}, function() {
gulp.start('jspm:build');
});
});
示例7: watcher
function watcher() {
watch(pathsToTs, compileTs);
}