@@ -2,6 +2,7 @@ module.exports = watch;
2
2
3
3
var debug = require ( 'debug' ) ;
4
4
var chokidar = require ( 'chokidar' ) ;
5
+ var undefsafe = require ( 'undefsafe' ) ;
5
6
var config = require ( '../config' ) ;
6
7
var path = require ( 'path' ) ;
7
8
var utils = require ( '../utils' ) ;
@@ -50,13 +51,19 @@ function filterAndRestart(files) {
50
51
}
51
52
52
53
var cwd = process . cwd ( ) ;
53
- utils . log . detail ( 'files triggering change check: ' + files . map ( function ( file ) {
54
- return path . relative ( cwd , file ) ;
55
- } ) . join ( ', ' ) ) ;
56
-
57
- var matched = match ( files , config . options . monitor , config . options . execOptions . ext ) ;
58
-
59
- utils . log . detail ( 'changes after filters (before/after): ' + [ files . length , matched . result . length ] . join ( '/' ) ) ;
54
+ utils . log . detail ( 'files triggering change check: ' +
55
+ files . map ( function ( file ) {
56
+ return path . relative ( cwd , file ) ;
57
+ } ) . join ( ', ' ) ) ;
58
+
59
+ var matched = match (
60
+ files ,
61
+ config . options . monitor ,
62
+ undefsafe ( config , 'options.execOptions.ext' )
63
+ ) ;
64
+
65
+ utils . log . detail ( 'changes after filters (before/after): ' +
66
+ [ files . length , matched . result . length ] . join ( '/' ) ) ;
60
67
61
68
// reset the last check so we're only looking at recently modified files
62
69
config . lastStarted = Date . now ( ) ;
0 commit comments