File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -77,19 +77,24 @@ Watching.prototype._go = function() {
7777 } ) ;
7878} ;
7979
80+ Watching . prototype . _getStats = function ( compilation ) {
81+ var stats = new Stats ( compilation ) ;
82+ stats . startTime = this . startTime ;
83+ stats . endTime = new Date ( ) . getTime ( ) ;
84+ return stats ;
85+ } ;
86+
8087Watching . prototype . _done = function ( err , compilation ) {
8188 this . running = false ;
8289 if ( this . invalid ) return this . _go ( ) ;
8390
91+ var stats = this . _getStats ( compilation ) ;
8492 if ( err ) {
8593 this . compiler . applyPlugins ( "failed" , err ) ;
86- this . handler ( err ) ;
94+ this . handler ( err , stats ) ;
8795 return ;
8896 }
8997
90- var stats = new Stats ( compilation ) ;
91- stats . startTime = this . startTime ;
92- stats . endTime = new Date ( ) . getTime ( ) ;
9398 this . compiler . applyPlugins ( "done" , stats ) ;
9499 this . handler ( null , stats ) ;
95100 if ( ! this . closed ) {
You can’t perform that action at this time.
0 commit comments