Stormy soil to slow down

Here is my Gruntfile.js

watch: {
            options: { livereload: true },
            compass: {
                files: ['assets/sass/*.{scss,sass}'],
                tasks: ['compass']
            },
            // js: {
            //  files: '<%= jshint.all %>',
            //  tasks: ['jshint', 'uglify']
            // },
            livereload: {
                // files: ['*.html', '*.php', 'assets/stylesheets/**/*.{css}']
                files: ['*.html', '*.php', 'assets/stylesheets/custom.css']
            }
        },

        // compass and scss
        compass: {
            dist: {
                options: {
                config: 'config.rb',
                force: true
                }
            }
        },

, and this is inferred from grunt watch:

Done, without errors.
... Reload assets/sass/custom.scss ...
... Reload assets/stylesheets/custom.css ...
Completed in 11.033s at Fri Dec 06 2013 14:20:48 GMT+0100 (CET) - Waiting...
OK
>> File "assets/stylesheets/custom.css" changed.
>> File "assets/sass/custom.scss" changed.

Running "compass:dist" (compass) task
overwrite assets/stylesheets/custom.css (0.701s)
identical assets/stylesheets/app.css (3.452s)
Compilation took 4.158s

Done, without errors.
... Reload assets/sass/custom.scss ...
... Reload assets/stylesheets/custom.css ...
Completed in 10.719s at Fri Dec 06 2013 14:21:53 GMT+0100 (CET) - Waiting...

  • .. so, why does it take too long to increase the page brightness, 10 seconds to preview any changes in my .scss file, just as it will be possible not to refresh the page completely, but only to make .css changes on the page?
  • .. another thing I would like to know is how to avoid this Compilation delay on app.css, which took almost 4 seconds, and it hasn't even changed?

I am using a browser extension with support for this feature.

Thanks.

+4
source share
2 answers

1a: , spawn: false. , . , . , . .

1b:

, . ( , css). - scss. - , . , css.

-, . , , , , .

https://github.com/gruntjs/grunt-contrib-watch/issues/205

2:

, , , , .

+2

.css:

    watch: {
        compass: {
            files: ['assets/sass/*.{scss,sass}'],
            tasks: ['compass']
        },
        livereload: {
            files: ['assets/stylesheets/*.css'],
            options: { livereload: true }
        }
    }

, ( ).

0

All Articles