diff --git a/Gruntfile.js b/Gruntfile.js index 1b1e3505..59023a9b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -9,7 +9,6 @@ module.exports = function (grunt) { ' * Copyright <%= grunt.template.today("yyyy") %>, <%= pkg.author.name %>\n' + ' * Dual licensed under the MIT or GPL licenses.\n' + ' */\n\n'; - var getFiles = function (){ return fileList @@ -69,6 +68,10 @@ module.exports = function (grunt) { 'tests/math.html'] }, + jsvalidate: { + files: "crafty.js" + }, + }); // Load the plugin that provides the "uglify" task. @@ -76,16 +79,17 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-qunit'); + grunt.loadNpmTasks('grunt-jsvalidate'); // Defined tasks for Crafty grunt.registerTask('api', "Generate api documentation", docGen) // Default task. - grunt.registerTask('default', ['concat']); + grunt.registerTask('default', ['concat', 'jsvalidate']); // Task chains - grunt.registerTask('check', ['concat', 'qunit', 'jshint']) + grunt.registerTask('check', ['concat', 'jsvalidate', 'qunit', 'jshint']) grunt.registerTask('release', ['concat', 'uglify', 'api']); diff --git a/package.json b/package.json index ca783e5e..112e2cf0 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ "grunt-contrib-concat": "0.3.0", "grunt-contrib-jshint": "0.5.2", "grunt-contrib-qunit": "0.2.1", + "grunt-jsvalidate": "0.2.1", "marked": "0.2.9", "coffee-script": "1.6.3" }