File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -235,17 +235,20 @@ function loadGulpfile(){
235235 require ( path . resolve ( process . cwd ( ) + '/' + names [ i ] ) ) ;
236236 return true ;
237237 } catch ( e ) {
238- if ( e instanceof SyntaxError ) {
239- console . error ( '\nThere is a syntax error in your gulpfile:' ) ;
240- console . error ( e . message )
241- process . exit ( 1 ) ;
242- }
243- if ( e . code === 'MODULE_NOT_FOUND' && e . message . indexOf ( names [ i ] ) === - 1 ) {
244- console . log ( 'Uh oh! Looks like you\'re missing a module in your gulpfile:' ) ;
245- console . error ( e . message ) ;
246- console . log ( '\nDo you need to run `npm install`?\n' ) ;
247- process . exit ( 1 ) ;
238+ if ( e . code === 'MODULE_NOT_FOUND' ) {
239+ if ( e . message . indexOf ( names [ i ] ) === - 1 ) {
240+ console . log ( 'Uh oh! Looks like you\'re missing a module in your gulpfile:' ) ;
241+ console . error ( e . message ) ;
242+ console . log ( '\nDo you need to run `npm install`?\n' ) ;
243+ process . exit ( 1 ) ;
244+ } else {
245+ // ignore missing gulpfile
246+ continue
247+ }
248248 }
249+ console . error ( 'There is an error in your gulpfile: ' )
250+ console . error ( e . stack ) ;
251+ process . exit ( 1 ) ;
249252 }
250253 }
251254 return false ;
You can’t perform that action at this time.
0 commit comments