@@ -91,19 +91,18 @@ var treatTestErrorsAsFatal = true;
9191
9292function runJasmineTests ( globs , done ) {
9393 var args = [ '--' ] . concat ( globs ) ;
94- fork ( './tools/traceur-jasmine' , args , {
95- stdio : 'inherit'
96- } ) . on ( 'close' , function jasmineCloseHandler ( exitCode ) {
97- if ( exitCode && treatTestErrorsAsFatal ) {
98- var err = new Error ( 'Jasmine tests failed' ) ;
99- // Mark the error for gulp similar to how gulp-utils.PluginError does it.
100- // The stack is not useful in this context.
101- err . showStack = false ;
102- done ( err ) ;
103- } else {
104- done ( ) ;
105- }
106- } ) ;
94+ fork ( './tools/cjs-jasmine' , args , { stdio : 'inherit' } )
95+ . on ( 'close' , function jasmineCloseHandler ( exitCode ) {
96+ if ( exitCode && treatTestErrorsAsFatal ) {
97+ var err = new Error ( 'Jasmine tests failed' ) ;
98+ // Mark the error for gulp similar to how gulp-utils.PluginError does it.
99+ // The stack is not useful in this context.
100+ err . showStack = false ;
101+ done ( err ) ;
102+ } else {
103+ done ( ) ;
104+ }
105+ } ) ;
107106}
108107
109108// Note: when DART_SDK is not found, all gulp tasks ending with `.dart` will be skipped.
@@ -141,11 +140,8 @@ var BENCHPRESS_BUNDLE_CONFIG = {
141140 'angular2'
142141 ] ,
143142 excludes : [
144- 'traceur' ,
145- 'traceur/bin/traceur-runtime' ,
146143 'reflect-metadata' ,
147144 'selenium-webdriver' ,
148- 'rtts_assert' ,
149145 'zone.js'
150146 ] ,
151147 ignore : [
@@ -837,47 +833,46 @@ gulp.task('build/pure-packages.dart', function() {
837833 ] )
838834 . pipe ( gulp . dest ( path . join ( CONFIG . dest . dart , 'angular2' ) ) ) ;
839835
840- var moveStream = gulp
841- . src ( [
842- 'modules_dart/**/*.dart' ,
843- 'modules_dart/**/pubspec.yaml' ,
844- '!modules_dart/transform/**'
845- ] )
846- . pipe ( through2 . obj ( function ( file , enc , done ) {
847- if ( file . path . endsWith ( 'pubspec.yaml' ) ) {
848- // Pure packages specify dependency_overrides relative to
849- // `modules_dart`, so they have to walk up and into `dist`.
850- //
851- // Example:
852- //
853- // dependency_overrides:
854- // angular2:
855- // path: ../../dist/dart/angular2
856- //
857- // When we copy a pure package into `dist` the relative path
858- // must be updated. The code below replaces paths accordingly.
859- // So the example above is turned into:
860- //
861- // dependency_overrides:
862- // angular2:
863- // path: ../angular2
864- //
865- var pubspec = yaml . safeLoad ( file . contents . toString ( ) ) ;
866- var overrides = pubspec . dependency_overrides ;
867- if ( overrides ) {
868- Object . keys ( overrides ) . forEach ( function ( pkg ) {
869- var overridePath = overrides [ pkg ] . path ;
870- if ( overridePath . startsWith ( originalPrefix ) ) {
871- overrides [ pkg ] . path = overridePath . replace ( originalPrefix , '../' ) ;
872- }
873- } ) ;
874- file . contents = new Buffer ( yaml . safeDump ( pubspec ) ) ;
875- }
876- }
877- this . push ( file ) ;
878- done ( ) ;
879- } ) )
880- . pipe ( gulp . dest ( CONFIG . dest . dart ) ) ;
836+ var moveStream = gulp . src ( [
837+ 'modules_dart/**/*.dart' ,
838+ 'modules_dart/**/pubspec.yaml' ,
839+ '!modules_dart/transform/**'
840+ ] )
841+ . pipe ( through2 . obj ( function ( file , enc , done ) {
842+ if ( / p u b s p e c .y a m l $ / . test ( file . path ) ) {
843+ // Pure packages specify dependency_overrides relative to
844+ // `modules_dart`, so they have to walk up and into `dist`.
845+ //
846+ // Example:
847+ //
848+ // dependency_overrides:
849+ // angular2:
850+ // path: ../../dist/dart/angular2
851+ //
852+ // When we copy a pure package into `dist` the relative path
853+ // must be updated. The code below replaces paths accordingly.
854+ // So the example above is turned into:
855+ //
856+ // dependency_overrides:
857+ // angular2:
858+ // path: ../angular2
859+ //
860+ var pubspec = yaml . safeLoad ( file . contents . toString ( ) ) ;
861+ var overrides = pubspec . dependency_overrides ;
862+ if ( overrides ) {
863+ Object . keys ( overrides ) . forEach ( function ( pkg ) {
864+ var overridePath = overrides [ pkg ] . path ;
865+ if ( ( new RegExp ( '^' + originalPrefix ) ) . test ( overridePath ) ) {
866+ overrides [ pkg ] . path = overridePath . replace ( originalPrefix , '../' ) ;
867+ }
868+ } ) ;
869+ file . contents = new Buffer ( yaml . safeDump ( pubspec ) ) ;
870+ }
871+ }
872+ this . push ( file ) ;
873+ done ( ) ;
874+ } ) )
875+ . pipe ( gulp . dest ( CONFIG . dest . dart ) ) ;
881876
882877
883878 return merge2 ( transformStream , moveStream ) ;
@@ -1145,13 +1140,11 @@ gulp.task('!bundle.js.min.deps', ['!bundle.js.min'], function() {
11451140} ) ;
11461141
11471142var JS_DEV_DEPS = [
1148- licenseWrap ( 'node_modules/zone.js/LICENSE' , true ) ,
1149- 'node_modules/zone.js/dist/zone-microtask.js' ,
1150- 'node_modules/zone.js/dist/long-stack-trace-zone.js' ,
1151- licenseWrap ( 'node_modules/reflect-metadata/LICENSE' , true ) ,
1152- 'node_modules/reflect-metadata/Reflect.js' ,
1153- // traceur-runtime is always first in the bundle
1154- licenseWrap ( 'node_modules/traceur/LICENSE' , true )
1143+ licenseWrap ( 'node_modules/zone.js/LICENSE' , true ) ,
1144+ 'node_modules/zone.js/dist/zone-microtask.js' ,
1145+ 'node_modules/zone.js/dist/long-stack-trace-zone.js' ,
1146+ licenseWrap ( 'node_modules/reflect-metadata/LICENSE' , true ) ,
1147+ 'node_modules/reflect-metadata/Reflect.js'
11551148] ;
11561149
11571150// Splice in RX license if rx is in the bundle.
0 commit comments