]> source.dussan.org Git - jquery.git/commitdiff
Lint JSON manifests during development
authorTimmy Willison <timmywillisn@gmail.com>
Fri, 19 Jul 2013 13:53:57 +0000 (09:53 -0400)
committerTimmy Willison <timmywillisn@gmail.com>
Fri, 19 Jul 2013 13:55:26 +0000 (09:55 -0400)
Gruntfile.js
package.json

index ef5e184219d8abb3408d5e7c1fd848ad30e26639..b0cf75ce374a3c987fc4b698e3a3a9cf71abbec0 100644 (file)
@@ -73,7 +73,14 @@ module.exports = function( grunt ) {
                                ]
                        }
                },
-
+               jsonlint: {
+                       pkg: {
+                               src: [ "package.json" ]
+                       },
+                       bower: {
+                               src: [ "bower.json" ]
+                       }
+               },
                jshint: {
                        dist: {
                                src: [ "dist/jquery.js" ],
@@ -92,16 +99,13 @@ module.exports = function( grunt ) {
                                }
                        }
                },
-
                testswarm: {
                        tests: "ajax attributes callbacks core css data deferred dimensions effects event manipulation offset queue selector serialize support traversing Sizzle".split(" ")
                },
-
                watch: {
                        files: [ "<%= jshint.grunt.src %>", "<%= jshint.tests.src %>", "src/**/*.js" ],
                        tasks: "dev"
                },
-
                "pre-uglify": {
                        all: {
                                files: {
@@ -578,10 +582,11 @@ module.exports = function( grunt ) {
        grunt.loadNpmTasks("grunt-contrib-watch");
        grunt.loadNpmTasks("grunt-contrib-jshint");
        grunt.loadNpmTasks("grunt-contrib-uglify");
-
-       // Default grunt
-       grunt.registerTask( "default", [ "selector", "build:*:*", "jshint", "pre-uglify", "uglify", "post-uglify", "dist:*", "compare_size" ] );
+       grunt.loadNpmTasks("grunt-jsonlint");
 
        // Short list as a high frequency watch task
        grunt.registerTask( "dev", [ "selector", "build:*:*", "jshint" ] );
+
+       // Default grunt
+       grunt.registerTask( "default", [ "jsonlint", "dev", "pre-uglify", "uglify", "post-uglify", "dist:*", "compare_size" ] );
 };
index 01fe0df254330eab3f513ff77354eeeee934a36b..4d260b49786be4b95a3d72b49c066c2d71e07eb0 100644 (file)
@@ -31,7 +31,8 @@
                "grunt-contrib-uglify": "~0.2.2",
                "gzip-js": "0.3.2",
                "testswarm": "~1.1.0",
-               "archiver": "~0.4.6"
+               "archiver": "~0.4.6",
+               "grunt-jsonlint": "~1.0.0"
        },
        "keywords": []
 }