@@ -322,7 +322,10 @@ function createDocsTasks(publicBuild) {
322322
323323 gulp . task ( taskPrefix , [ taskPrefix + '/assets' , taskPrefix + '/app' , taskPrefix + '/dgeni' ] ) ;
324324 gulp . task ( taskPrefix + '/watch' , function ( ) {
325- return watch ( 'docs/app/**/*' , { ignoreInitial : false } , [ taskPrefix + '/app' ] ) ;
325+ return watch ( 'docs/app/**/*' , {
326+ ignoreInitial : false ,
327+ log : watchLog
328+ } , [ taskPrefix + '/app' ] ) ;
326329 } ) ;
327330
328331 gulp . task ( taskPrefix + '/test' , function ( done ) {
@@ -466,7 +469,7 @@ gulp.task('test.unit.cjs', ['build/clean.js', 'build.tools'], function (neverDon
466469 'test.unit.cjs/ci'
467470 ] ;
468471
469- watch ( 'modules/**' , { ignoreInitial : false } , buildAndTest ) ;
472+ watch ( 'modules/**' , { ignoreInitial : false , log : watchLog } , buildAndTest ) ;
470473} ) ;
471474
472475
@@ -484,7 +487,10 @@ gulp.task('test.unit.tools', ['build/clean.tools'], function(done) {
484487 'test.unit.tools/ci'
485488 ] ;
486489
487- watch ( [ 'tools/**' , '!tools/**/test-fixtures/**' ] , { ignoreInitial : false } , buildAndTest ) ;
490+ watch ( [ 'tools/**' , '!tools/**/test-fixtures/**' ] , {
491+ ignoreInitial : false ,
492+ log : watchLog
493+ } , buildAndTest ) ;
488494} ) ;
489495
490496
@@ -836,3 +842,21 @@ process.on('beforeExit', function() {
836842 beforeExitRan = true ;
837843 gulp . start ( 'cleanup.builder' ) ;
838844} ) ;
845+
846+ function watchLog ( triggerCount ) {
847+ // Ignore initial event
848+ if ( ! -- triggerCount ) return ;
849+
850+ process . stdout . write ( [
851+ '' ,
852+ '==================================================' ,
853+ ' WATCH TRIGGERED BY FILE CHANGE #' + triggerCount ,
854+ ' On: ' + prettyTime ( ) ,
855+ '==================================================\n' ,
856+ ] . join ( '\n' ) ) ;
857+
858+ function prettyTime ( ) {
859+ var now = new Date ( ) ;
860+ return now . toLocaleDateString ( ) + " at " + now . toLocaleTimeString ( ) ;
861+ }
862+ }
0 commit comments