tschaub / grunt-newer

Configure Grunt tasks to run with newer files only.
https://npmjs.org/package/grunt-newer
MIT License
945 stars 53 forks source link

LESSLint : Always linting full file stack. #53

Open SpencerCarstens opened 10 years ago

SpencerCarstens commented 10 years ago

Each time a change happens to a less file, the entirety of the files are ran through the linter.

I have tried with/without the spawn/cwd options on the watch.

Ideas? Thanks.

Snipped - watch block.

watch: {
    lesslint: {
            files: [
                      '<%= codebase %>**/_less/*.less',
                      '!<%= codebase %><%= bootstrap %>_less/**/*.less'
                    ],
            tasks: [ 'newer:lesslint:module' ],
            options: {
                spawn: false,
                cwd: '<%= codebase %>'
        }
    },
}

Snipped - lesslint block.

lesslint: {
      module: {
        src: [
                '<%= codebase %>**/_less/*.less',
                '!<%= codebase %><%= bootstrap %>_less/**/*.less'
              ],
      },
      imports: {
        src: [ '<%= codebase %><%= bootstrap %>_less/imports.less' ]
      }
    },