@@ -195,7 +195,7 @@ function runE2e() {
195
195
return spawnInfo . promise ;
196
196
} )
197
197
. then ( function ( ) {
198
- copyExampleBoilerplate ( ) ;
198
+ buildStyles ( copyExampleBoilerplate , _ . noop ) ;
199
199
gutil . log ( 'runE2e: update webdriver' ) ;
200
200
spawnInfo = spawnExt ( 'npm' , [ 'run' , 'webdriver:update' ] , { cwd : EXAMPLES_PROTRACTOR_PATH } ) ;
201
201
return spawnInfo . promise ;
@@ -419,7 +419,7 @@ gulp.task('help', taskListing.withFilters(function(taskName) {
419
419
} ) ) ;
420
420
421
421
// requires admin access because it adds symlinks
422
- gulp . task ( 'add-example-boilerplate' , function ( ) {
422
+ gulp . task ( 'add-example-boilerplate' , function ( done ) {
423
423
var realPath = path . join ( EXAMPLES_PATH , '/node_modules' ) ;
424
424
var nodeModulesPaths = excludeDartPaths ( getNodeModulesPaths ( EXAMPLES_PATH ) ) ;
425
425
@@ -435,24 +435,24 @@ gulp.task('add-example-boilerplate', function() {
435
435
fsUtils . addSymlink ( realPath , linkPath ) ;
436
436
} ) ;
437
437
438
- return buildStyles ( copyExampleBoilerplate ) ;
438
+ return buildStyles ( copyExampleBoilerplate , done ) ;
439
439
} ) ;
440
440
441
441
442
442
// copies boilerplate files to locations
443
443
// where an example app is found
444
- gulp . task ( '_copy-example-boilerplate' , function ( ) {
445
- if ( ! argv . fast ) return buildStyles ( copyExampleBoilerplate ) ;
444
+ gulp . task ( '_copy-example-boilerplate' , function ( done ) {
445
+ if ( ! argv . fast ) buildStyles ( copyExampleBoilerplate , done ) ;
446
446
} ) ;
447
447
448
448
//Builds Angular 2 Docs CSS file from Bootstrap npm LESS source
449
449
//and copies the result to the _examples folder to be included as
450
450
//part of the example boilerplate.
451
- function buildStyles ( cb ) {
452
- return gulp . src ( path . join ( STYLES_SOURCE_PATH , _styleLessName ) )
451
+ function buildStyles ( cb , done ) {
452
+ gulp . src ( path . join ( STYLES_SOURCE_PATH , _styleLessName ) )
453
453
. pipe ( less ( ) )
454
- . pipe ( gulp . dest ( EXAMPLES_PATH ) ) . on ( 'finish ' , function ( ) {
455
- return cb ( ) ;
454
+ . pipe ( gulp . dest ( EXAMPLES_PATH ) ) . on ( 'end ' , function ( ) {
455
+ cb ( ) . then ( function ( ) { done ( ) ; } ) ;
456
456
} ) ;
457
457
}
458
458
0 commit comments