feat(build): add tasks to watch and recompile js and dart

This commit is contained in:
vsavkin 2015-10-13 13:42:38 -07:00 committed by Victor Savkin
parent 3b036601cc
commit 50e922f37b
1 changed files with 27 additions and 0 deletions

View File

@ -511,6 +511,10 @@ gulp.task('test.unit.js', ['build.js.dev'], function (done) {
);
});
gulp.task('watch.js.dev', ['build.js.dev'], function (done) {
watch('modules/**', ['!broccoli.js.dev']);
});
gulp.task('test.unit.js.sauce', ['build.js.dev'], function (done) {
var browserConf = getBrowsersFromCLI();
if (browserConf.isSauce) {
@ -597,6 +601,29 @@ gulp.task('test.unit.dart', function (done) {
);
});
gulp.task('watch.dart.dev', function (done) {
runSequence(
'build/tree.dart',
'build/pure-packages.dart',
'!build/pubget.angular2.dart',
'!build/change_detect.dart',
'!build/remove-pub-symlinks',
'build.dart.material.css',
function(error) {
// if initial build failed (likely due to build or formatting step) then exit
// otherwise karma server doesn't start and we can't continue running properly
if (error) {
done(error);
return;
}
watch(['modules/angular2/**'], { ignoreInitial: true }, [
'!build/tree.dart'
]);
}
);
});
gulp.task('!test.unit.dart/karma-run', function (done) {
// run the run command in a new process to avoid duplicate logging by both server and runner from
// a single process