gruntjs / grunt-contrib-watch

Run tasks whenever watched files change.
http://gruntjs.com/
MIT License
1.98k stars 356 forks source link

Watch isn't running tasks #486

Closed haniotis closed 8 years ago

haniotis commented 8 years ago

This is in my grunt config:

watch: {
      // recompile scss and reload
      email_scss: {
        files: ['src/scss/*'],
        tasks: ['sass:dist'],
        options: {
          livereload: true
        }
      },
      // reload when python email gen code changes
      emails: {
        files: ['src/emails/*'],
        tasks: [],
        options: {
          livereload: true
        }
      },
      // reload if index.ejs or _blank.html change
      preview_static: {
        files: ['preview/*'],
        tasks: [],
        options: {
          livereload: true
        }
      },
      // recompile preview scss and reload
      preview: {
        files: ['preview/scss/*'],
        tasks: ['sass:preview','autoprefixer:preview'],
        options: {
          livereload: true
        }
      }
    }

And if I comment out everything inside, then the behavior is exactly the same. It notices a file changed, but doesnt run any of the associated tasks.

haniotis commented 8 years ago

@ccorcos

cgiacomi commented 8 years ago

Same here, it seems like the tasks aren't getting called anymore.

Am trying to find a previous revision that actually works.

patik commented 8 years ago

My similar config is working fine on the latest version. Just for kicks, what happens if you change files: ['src/scss/*'] to files: ['src/scss/**/*.scss'] ?

haniotis commented 8 years ago

@patik That worked! Thanks a ton.