本文整理汇总了TypeScript中gulp.watch函数的典型用法代码示例。如果您正苦于以下问题:TypeScript watch函数的具体用法?TypeScript watch怎么用?TypeScript watch使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了watch函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: jade
gulp.task(name, [Build.name], () => {
const ts = [
root.application.scripts.typescripts().toString(),
root.application.scripts.typings().Not(),
// `${Folders.clientUnitTests}/**/*.ts`,
// `!${Folders.clientUnitTests}/typings/**/*`,
// `!${Folders.clientUnitTests}/node_modules/**/*`,
// `${Folders.gulp}/**/*.ts`,
// `!${Folders.gulp}/typings/**/*.ts`,
// `!${Folders.gulp}/node_modules/**/*`
];
const jade = [
root.application.jade().toString()
];
gulp.watch(jade, jadeLint);
gulp.watch(ts, tslint);
// gulp.watch(ts, purge);
gulp.watch(root.application.styles.files().toString(), [Css.name]);
// const environmentFiles = [
// root.application.environment.template().toString(),
// root.packageJson().toString()
// ];
// gulp.watch(environmentFiles, [Environment.name]);
gulp.watch(root.application. jade().toString(), [Jade.name]);
// gulp.watch(root.application.jade().toString(), purge);
});
开发者ID:ibzakharov,项目名称:angular_project_template,代码行数:29,代码来源:gulpfile.ts
示例2: function
gulp.task('autoTest', ['build-dev', 'templatecache', 'compile-specs'], function(done: () => any) {
gulp.watch([config.sourceTs], ['build-dev'])
.on('change', changeEvent);
gulp.watch([config.sourceSpecs], ['compile-specs'])
.on('change', changeEvent);
startTests(false, done);
});
开发者ID:dcaballeroc,项目名称:unicron,代码行数:7,代码来源:gulpfileTypescript.ts
示例3: function
gulp.task('browserSync', function () {
browserSync.init({
port: 8000,
proxy: "http://localhost:12345"
});
function debounce(fn, delay) {
var timer = null;
return function () {
var context = this, args = arguments;
clearTimeout(timer);
timer = setTimeout(function () {
fn.apply(context, args);
}, delay);
};
}
gulp.watch(["src/**/*.ts"], ['compile', 'reloadBrowserSync']).on('change', function (e) {
console.log('TypeScript file ' + e.path + ' has been changed. Compiling.');
});
gulp.watch(["src/*js", "src/**/*.html", "src/**/*.css"], ['resources', 'reloadBrowserSync']).on('change', function (e) {
console.log('Resource file ' + e.path + ' has been changed. Updating.');
});
gulp.watch('src/**/*.scss', ['sass', 'resources', 'reloadBrowserSync'], function(e){
console.log('Sass file ' + e.path + ' has been changed. Updating.');
});
});
开发者ID:benhallouk,项目名称:HCLC-Portal,代码行数:28,代码来源:gulpfile.ts
示例4: watch
function watch() {
gulp.watch(paths.html, html);
gulp.watch(paths.sass, styles);
gulp.watch(paths.ts, compile);
gulp.watch(paths.res, res);
gulp.watch(paths.loader, loader);
}
开发者ID:bradtaylor707,项目名称:asphalt,代码行数:7,代码来源:gulpfile.ts
示例5: function
gulp.task('watch', function () {
gulp.watch(["src/**/*.ts"]).on('change', function () {
});
gulp.watch(["src/**/*.html"]).on('change', function () {
});
gulp.watch('./src/app/styles/**/*.scss', ['sass']);
gulp.watch('./src/app/images/**', ['images']);
});
开发者ID:canygt27,项目名称:angular2-scaffolding,代码行数:8,代码来源:gulpfile.ts
示例6: runSequence
gulp.task("watch", () => {
gulp.watch(`${paths.coffee.watchSources}`, () => {
runSequence("scripts:build")
})
gulp.watch(`${paths.less.watchSources}`, () => {
runSequence("styles:build")
})
})
开发者ID:FourtekIT-incubator,项目名称:bokeh,代码行数:8,代码来源:watch.ts
示例7: function
gulp.task('watch', function () {
gulp.watch(["client/**/*.ts"], ['compile']).on('change', function (e) {
console.log('TypeScript file ' + e.path + ' has been changed. Compiling.');
});
gulp.watch(["client/**/*.html", "client/**/*.css"], ['resources']).on('change', function (e) {
console.log('Resource file ' + e.path + ' has been changed. Updating.');
});
});
开发者ID:camphor-scent,项目名称:camphor,代码行数:8,代码来源:gulpfile.ts
示例8: function
gulp.task('watch', function () {
gulp.watch(["frontend/**/*.ts", "backend/**/*.js" ], ['compile']).on('change', function (e) {
console.log('Source file ' + e.path + ' has been changed. Compiling.');
});
gulp.watch(["frontend/**/*.html", "frontend/**/*.css", "frontend/*.js"], ['resources']).on('change', function (e) {
console.log('Resource file ' + e.path + ' has been changed. Updating.');
});
});
开发者ID:Gettor,项目名称:d20Site,代码行数:8,代码来源:gulpfile.ts
示例9: task
task(':watch:devapp', () => {
watch(join(appDir, '**/*.ts'), [':build:devapp:ts', triggerLivereload]);
watch(join(appDir, '**/*.scss'), [':build:devapp:scss', triggerLivereload]);
watch(join(appDir, '**/*.html'), [':build:devapp:assets', triggerLivereload]);
// The themes for the demo-app are built by the demo-app using the SCSS mixins from Material.
// Therefore when the CSS files have been changed the SCSS mixins have been refreshed and
// copied over. Rebuilt the theme CSS using the updated SCSS mixins.
watch(join(materialOutPath, '**/*.css'), [':build:devapp:scss', triggerLivereload]);
});
开发者ID:jiw0220,项目名称:jigsaw,代码行数:10,代码来源:development.ts
示例10: function
return function(done) {
gulp.watch(project.transpiler.source, refreshCb).on('change', onChangeCb);
gulp.watch(project.markupProcessor.source, refreshCb).on('change', onChangeCb);
gulp.watch(project.cssProcessor.source, refreshCb).on('change', onChangeCb);
//see if there are static files to be watched
if (typeof project.build.copyFiles === 'object') {
const files = Object.keys(project.build.copyFiles);
gulp.watch(files, refreshCb).on('change', onChangeCb);
}
};
开发者ID:dwarry,项目名称:AspNetCoreWithAurelia,代码行数:11,代码来源:run.ts
注:本文中的gulp.watch函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论