@@ -744,24 +744,31 @@ gulp.task('test.unit.cjs', ['build/clean.js', 'build.tools'], function (neverDon
744744 watch ( 'modules/**' , buildAndTest ) ;
745745} ) ;
746746
747-
747+ // Use this target to continuously run dartvm unit-tests (such as transformer
748+ // tests) while coding. Note: these tests do not use Karma.
748749gulp . task ( 'test.unit.dartvm' , function ( done ) {
749750 runSequence (
750751 'build/tree.dart' ,
751752 'build/pure-packages.dart' ,
752- 'build/pubspec .dart' ,
753+ '! build/pubget.angular2 .dart' ,
753754 '!build/change_detect.dart' ,
754755 '!test.unit.dartvm/run' ,
755756 function ( error ) {
756- // if initial build failed (likely due to build or formatting step) then exit
757- // otherwise karma server doesn't start and we can't continue running properly
758- if ( error ) {
759- done ( error ) ;
760- return ;
761- }
762-
757+ // Watch for changes made in the TS and Dart code under "modules" and
758+ // run ts2dart and test change detector generator prior to rerunning the
759+ // tests.
763760 watch ( 'modules/angular2/**' , { ignoreInitial : true } , [
764761 '!build/tree.dart' ,
762+ '!build/change_detect.dart' ,
763+ '!test.unit.dartvm/run'
764+ ] ) ;
765+
766+ // Watch for changes made in Dart code under "modules_dart", then copy it
767+ // to dist and run test change detector generator prior to retunning the
768+ // tests.
769+ watch ( 'modules_dart/**' , { ignoreInitial : true } , [
770+ 'build/pure-packages.dart' ,
771+ '!build/change_detect.dart' ,
765772 '!test.unit.dartvm/run'
766773 ] ) ;
767774 }
@@ -863,14 +870,17 @@ gulp.task('build/pure-packages.dart', function() {
863870 var transformStream = gulp
864871 . src ( [
865872 'modules_dart/transform/**/*' ,
866- '!modules_dart/transform/**/*.proto'
873+ '!modules_dart/transform/**/*.proto' ,
874+ '!modules_dart/transform/pubspec.yaml' ,
875+ '!modules_dart/transform/**/packages{,/**}' ,
867876 ] )
868877 . pipe ( gulp . dest ( path . join ( CONFIG . dest . dart , 'angular2' ) ) ) ;
869878
870879 var moveStream = gulp . src ( [
871880 'modules_dart/**/*.dart' ,
872881 'modules_dart/**/pubspec.yaml' ,
873- '!modules_dart/transform/**'
882+ '!modules_dart/transform/**' ,
883+ '!modules_dart/**/packages{,/**}'
874884 ] )
875885 . pipe ( through2 . obj ( function ( file , enc , done ) {
876886 if ( / p u b s p e c .y a m l $ / . test ( file . path ) ) {
0 commit comments