MDL-49817 grunt: jslint rename task config and make explict src
authorDan Poltawski <dan@moodle.com>
Thu, 14 Jan 2016 12:07:32 +0000 (12:07 +0000)
committerDan Poltawski <dan@moodle.com>
Thu, 21 Jan 2016 15:13:45 +0000 (15:13 +0000)
Two reasons for this change:
1) The configuration here is confusing, it seems like we are setting the
   'files' option, but in fact we are just generating a task configuration
    called 'files'. Lets try and avoid confusion.

2) It makes it possible for 'watch' to override the src

Gruntfile.js

index 3dd3ef0..904ef3a 100644 (file)
@@ -33,7 +33,9 @@ module.exports = function(grunt) {
     grunt.initConfig({
         jshint: {
             options: {jshintrc: '.jshintrc'},
-            files: [inAMD ? cwd + '/src/*.js' : '**/amd/src/*.js']
+            amd: {
+                src: [inAMD ? cwd + '/src/*.js' : '**/amd/src/*.js']
+            }
         },
         uglify: {
             dynamic_mappings: {