File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ module.exports = function (grunt) {
94
94
'server.js' ,
95
95
'lib/**/*.{js,json}'
96
96
] ,
97
- tasks : [ 'newer:jshint:server' , 'express:dev' ] ,
97
+ tasks : [ 'newer:jshint:server' , 'express:dev' , 'wait' ] ,
98
98
options : {
99
99
livereload : true ,
100
100
nospawn : true //Without this option specified express won't be reloaded
@@ -427,6 +427,18 @@ module.exports = function (grunt) {
427
427
}
428
428
} ) ;
429
429
430
+ // Used for delaying livereload until after server has restarted
431
+ grunt . registerTask ( 'wait ', function ( ) {
432
+ grunt . log . ok ( 'Waiting for server reload...' ) ;
433
+
434
+ var done = this . async ( ) ;
435
+
436
+ setTimeout ( function ( ) {
437
+ grunt . log . writeln ( 'Done waiting!' ) ;
438
+ done ( ) ;
439
+ } , 500 ) ;
440
+ } );
441
+
430
442
grunt.registerTask('express-keepalive', 'Keep grunt running', function() {
431
443
this . async ( ) ;
432
444
} );
You can’t perform that action at this time.
0 commit comments