filechanges not noticed more than once per file #38

maerten opened this Issue Jan 22, 2013 · 4 comments

2 participants


I'm having trouble using 'grunt watch' on *.hbs files in a folder. The *.hbs files are handlebars templates to be compiled with the ember_templates plugin, which by itself works as expected. The result should be a single javascript file with compiled templates.

The problem: when I save a hbs file it's the task runs, but it stops watching that specific file. Changes to other files still get noticed, but also just once for each file.
So each time this happens I have to stop 'grunt watch', run the compile command once, and restart 'grunt watch'.

I'm using:
OS X 10.8.2,
node v0.8.2,

Output of grunt watch when I save the file 'navigation.hbs' twice:

Running "watch" task
>> File "templates/navigation.hbs" deleted.
>> File "templates" deleted.
Running "ember_templates:all" (ember_templates) task
File "templates.compiled.js" created.

Done, without errors.

Update: Just updated to node 0.8.18. that didn't solve the problem either.


I dont't really get why this isn't the default behavior, but setting options.interrupt to 'true' solved the problem for me.

watch: {
  scripts: {
    files: '**/*.js',
    tasks: ['jshint'],
    options: {
      interrupt: true
@maerten maerten closed this Jan 22, 2013

Hm it still doesnt really work actually.. Sometimes it does, sometimes it stops watching.

@maerten maerten reopened this Jan 22, 2013
grunt member

Try using the latest version of the watch: npm install grunt-contrib-watch@master


Works for me! Thanks!

@maerten maerten closed this Jan 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment