Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8474fe
)
MDL-55050 grunt: make eslint only build changed files on watch
author
Dan Poltawski
<dan@moodle.com>
Tue, 28 Jun 2016 17:21:04 +0000
(18:21 +0100)
committer
Dan Poltawski
<dan@moodle.com>
Tue, 28 Jun 2016 17:21:29 +0000
(18:21 +0100)
Previously a watch change was causing eslint to be re-run on every file.
Gruntfile.js
patch
|
blob
|
blame
|
history
diff --git
a/Gruntfile.js
b/Gruntfile.js
index
b728341
..
d832153
100644
(file)
--- a/
Gruntfile.js
+++ b/
Gruntfile.js
@@
-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);