mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Lint JSON manifests during development
This commit is contained in:
parent
c33108cad1
commit
07b5f126e2
19
Gruntfile.js
19
Gruntfile.js
@ -73,7 +73,14 @@ module.exports = function( grunt ) {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
jsonlint: {
|
||||||
|
pkg: {
|
||||||
|
src: [ "package.json" ]
|
||||||
|
},
|
||||||
|
bower: {
|
||||||
|
src: [ "bower.json" ]
|
||||||
|
}
|
||||||
|
},
|
||||||
jshint: {
|
jshint: {
|
||||||
dist: {
|
dist: {
|
||||||
src: [ "dist/jquery.js" ],
|
src: [ "dist/jquery.js" ],
|
||||||
@ -92,16 +99,13 @@ module.exports = function( grunt ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
testswarm: {
|
testswarm: {
|
||||||
tests: "ajax attributes callbacks core css data deferred dimensions effects event manipulation offset queue selector serialize support traversing Sizzle".split(" ")
|
tests: "ajax attributes callbacks core css data deferred dimensions effects event manipulation offset queue selector serialize support traversing Sizzle".split(" ")
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
files: [ "<%= jshint.grunt.src %>", "<%= jshint.tests.src %>", "src/**/*.js" ],
|
files: [ "<%= jshint.grunt.src %>", "<%= jshint.tests.src %>", "src/**/*.js" ],
|
||||||
tasks: "dev"
|
tasks: "dev"
|
||||||
},
|
},
|
||||||
|
|
||||||
"pre-uglify": {
|
"pre-uglify": {
|
||||||
all: {
|
all: {
|
||||||
files: {
|
files: {
|
||||||
@ -583,10 +587,11 @@ module.exports = function( grunt ) {
|
|||||||
grunt.loadNpmTasks("grunt-contrib-watch");
|
grunt.loadNpmTasks("grunt-contrib-watch");
|
||||||
grunt.loadNpmTasks("grunt-contrib-jshint");
|
grunt.loadNpmTasks("grunt-contrib-jshint");
|
||||||
grunt.loadNpmTasks("grunt-contrib-uglify");
|
grunt.loadNpmTasks("grunt-contrib-uglify");
|
||||||
|
grunt.loadNpmTasks("grunt-jsonlint");
|
||||||
// Default grunt
|
|
||||||
grunt.registerTask( "default", [ "selector", "build:*:*", "jshint", "pre-uglify", "uglify", "post-uglify", "dist:*", "compare_size" ] );
|
|
||||||
|
|
||||||
// Short list as a high frequency watch task
|
// Short list as a high frequency watch task
|
||||||
grunt.registerTask( "dev", [ "selector", "build:*:*", "jshint" ] );
|
grunt.registerTask( "dev", [ "selector", "build:*:*", "jshint" ] );
|
||||||
|
|
||||||
|
// Default grunt
|
||||||
|
grunt.registerTask( "default", [ "jsonlint", "dev", "pre-uglify", "uglify", "post-uglify", "dist:*", "compare_size" ] );
|
||||||
};
|
};
|
||||||
|
@ -31,7 +31,8 @@
|
|||||||
"grunt-contrib-uglify": "~0.2.2",
|
"grunt-contrib-uglify": "~0.2.2",
|
||||||
"gzip-js": "0.3.2",
|
"gzip-js": "0.3.2",
|
||||||
"testswarm": "~1.1.0",
|
"testswarm": "~1.1.0",
|
||||||
"archiver": "~0.4.6"
|
"archiver": "~0.4.6",
|
||||||
|
"grunt-jsonlint": "~1.0.0"
|
||||||
},
|
},
|
||||||
"keywords": []
|
"keywords": []
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user