gruntjs / grunt-contrib-watch

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

style.css not reloading #473

Open harberg opened 8 years ago

harberg commented 8 years ago

Hello,

I really like this module and use it in most of my projects. Normally I am working with scss, but the current project is just regular ol' css. I added the module and it is working for every file except for style.css. All my php files reload just fine and other .css files reload, just not style.css. I have no idea why this is happening? This is a WordPress project. The Gruntfile.js is as follows.

module.exports = function (grunt) {

    require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        watch: {
            php: {
                files : ["**/*.php"],
            },
            css: {
                files : ["**/*.css"],
                options: {
                    spawn: false,
                }
            },
            options: {
                livereload : true
            },
        },
    });// end grunt.initConfig
    grunt.registerTask('default', ['watch']);
};

Any help would be great. I have been banging my head against the table for several hours now.

Thanks.

shama commented 8 years ago

Try running with grunt watch --verbose and ensure the file is being watched. It doesn't really care what type of file it is so because it is a css file shouldn't be an issue.