ColemanGariety / gulp-nodemon

gulp + nodemon + convenience
526 stars 76 forks source link

not watching files recursively ? #129

Closed andyfen closed 8 years ago

andyfen commented 8 years ago
gulp.task('default', ['watch'], () =>
  nodemon({
    script: 'index.js',
    watch: [
      //'app/views/home.hbs',
      'app/views'
    ],
    ignore: 'public'
  })
);

when i link to the file directly (as per the commented out line) it works. when i try to watch the folder 'app/views' and then make changes it dosn't seem to register anything ?

iv'e tried a few different combinations 'app/views/**/*' 'app/views/*.hbs'

it's showing on run that it should be ? using the above gulp task code

[nodemon] watching: /Users/user/Documents/myapp/app/views/**/*

ColemanGariety commented 8 years ago

I was unable to reproduce this :-/

Does nodemon respond /at all/ the way you have it? Or does nothing happen?

What happens if you remove the ignore?

andyfen commented 8 years ago

thank for taking the time to look.

it seems to be when 'app/views' is included in the watch array it stops responding.

gulp.task('default',  () =>
  nodemon({
    script: 'index.js',
    watch: [
      'index.js', <!-- works
      'app/views/home.hbs', <!-- works
      'app/views' <!-- nodemon stops responding when this is added
    ],
    //ignore: 'public' <!-- tried removing 
  })
);

i do have partials in the folder so i removed them to test and its still occurring.

andyfen commented 8 years ago

it might possibly be related to this https://github.com/gilt/koa-hbs/issues/52

andyfen commented 8 years ago

ok all i need to do was add ext: 'hbs',

thanks again. close.