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); });
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); });
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.'); }); });
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); }
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']); });
gulp.task("watch", () => { gulp.watch(`${paths.coffee.watchSources}`, () => { runSequence("scripts:build") }) gulp.watch(`${paths.less.watchSources}`, () => { runSequence("styles:build") }) })
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.'); }); });
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.'); }); });
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]); });
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); } };