Note that there are some explanatory texts on larger screens.

plurals
  1. POgrunt-autoprefixer loops endlessly when using grunt-contrib-watch
    text
    copied!<p>I'm just learning <strong>Grunt</strong>. I'm going to use compass for vertical rhythm and image sprite generation and autoprefixer for prefixing css3 styles.</p> <p>Here's my <strong>Gruntfile.js</strong>.</p> <pre><code>module.exports = function(grunt) { var globalConfig = { sassDir: 'sass', cssDir: 'css' }; require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); // Project configuration. grunt.initConfig({ globalConfig: globalConfig, pkg: grunt.file.readJSON('package.json'), compass: { dev: { options: { sassDir: '&lt;%= globalConfig.sassDir %&gt;', cssDir: '&lt;%= globalConfig.cssDir %&gt;' } } }, autoprefixer: { dev: { options: { browsers: ['last 2 versions'] }, src: '&lt;%= globalConfig.cssDir %&gt;/style.css', dest: '&lt;%= globalConfig.cssDir %&gt;/style.css' } }, watch: { compass: { files: ['&lt;%= globalConfig.sassDir %&gt;/**/*.scss'], tasks: ['compass:dev'], }, autoprefixer: { files: ['&lt;%= globalConfig.cssDir %&gt;/style.css'], tasks: ['autoprefixer:dev'] }, livereload: { options: { livereload: true }, files: ['&lt;%= globalConfig.cssDir %&gt;/style.css'] } } }); // Default task(s) that will be run by invoking 'grunt' w/o args grunt.registerTask('styles:dev', ['compass', 'autoprefixer']); grunt.registerTask('default', ['styles:dev', 'watch']); }; </code></pre> <p>But whenever i run</p> <pre><code>grunt </code></pre> <p>Everything works as expected except that grunt-contrib-watch calls grunt-autoprefixer endlessly.</p> <p>I'm just beginning to learn <strong>Grunt</strong>. It's probably a wrong configuration on my <strong>Gruntfile.js</strong></p> <p>I hope you could help me out here.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload