diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2013-07-19 09:53:57 -0400 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2013-07-19 09:54:15 -0400 |
commit | 07b5f126e2067e115dde8ab4161a66a96e27adaa (patch) | |
tree | 5b5521f9382b7df7c0fd1faa627a4b4df63bc762 | |
parent | c33108cad16ba6ff831d5cbc45b9dfbf12650e0e (diff) | |
download | jquery-07b5f126e2067e115dde8ab4161a66a96e27adaa.tar.gz jquery-07b5f126e2067e115dde8ab4161a66a96e27adaa.zip |
Lint JSON manifests during development
-rw-r--r-- | Gruntfile.js | 19 | ||||
-rw-r--r-- | package.json | 3 |
2 files changed, 14 insertions, 8 deletions
diff --git a/Gruntfile.js b/Gruntfile.js index adc3b7384..27ad0f919 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -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: { @@ -583,10 +587,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" ] ); }; diff --git a/package.json b/package.json index b98eb051b..222000605 100644 --- a/package.json +++ b/package.json @@ -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": [] } |