Chrome开发者工具没有重新加载css

时间:2016-11-28 13:07:11

标签: css google-chrome sass google-chrome-devtools

我正在使用Chrome DevTools。我想优化我的工作流程,因此我尝试将Chrome配置为在使用grunt-contrib-compass进行编译后重新加载css。但我现在已经尝试了两个小时,Chrome不会重新加载我的css文件。我错过了什么吗?

SERVER 正在使用XAMPP

运行

CHROME CONFIG enter image description here

GRUNT CONFIG

module.exports = function( grunt ) {
    grunt.initConfig({

        // JavaScript
        eslint: {
            all: [
                "Gruntfile.js",
                "js/app.js"
            ]
        },

        // CSS
        compass: {
            dev: {
                options: {
                    importPath: "node_modules/foundation-sites/scss",
                    sassDir: "sass",
                    cssDir: "../assets/css",
                    noLineComments: true,
                    sourcemap: true
                }
            },
            deploy: {
                options: {
                    importPath: "node_modules/foundation-sites/scss",
                    sassDir: "sass",
                    cssDir: "../assets/css",
                    noLineComments: true,
                    environment: "production"
                }
            }
        },

        // Watch for changes
        watch: {
            css: {
                files: ["sass/**/*.scss"],
                tasks: ["compass:dev"]
           },
           js: {
                files: ["js/**/*.js"],
                tasks: ["eslint"]
            }
        }

    });

    // Load plugins
    grunt.loadNpmTasks("grunt-contrib-compass");
    grunt.loadNpmTasks("grunt-contrib-watch");
    grunt.loadNpmTasks("eslint-grunt");

    // Register Task(s).
    grunt.registerTask( "dev", ["watch"] );
    grunt.registerTask( "deploy", ["uglify"] );
};

响应grunt dev

>> File "sass\_header.scss" changed.
Running "compass:build" (compass) task
    write D:/xampp/htdocs/defaultwp/wp-content/themes/wadt/assets/css/app.css (0.853s)
    write D:/xampp/htdocs/defaultwp/wp-content/themes/wadt/assets/css/app.css.map

Done. Completed in 3.455s 

0 个答案:

没有答案