MDL-55050 grunt: make eslint only build changed files on watch

Previously a watch change was causing eslint to be re-run on every file.
This commit is contained in:
Dan Poltawski 2016-06-28 18:21:04 +01:00
parent b8474fe0c7
commit a382101c6e

View File

@ -286,6 +286,8 @@ module.exports = function(grunt) {
var changedFiles = Object.create(null);
var onChange = grunt.util._.debounce(function() {
var files = Object.keys(changedFiles);
grunt.config('eslint.amd.src', files);
grunt.config('eslint.yui.src', files);
grunt.config('jshint.amd.src', files);
grunt.config('uglify.amd.files', [{ expand: true, src: files, rename: uglifyRename }]);
grunt.config('shifter.options.paths', files);