diff --git a/Gruntfile.js b/Gruntfile.js index 323c9a19e7..1e3ae614e7 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -295,6 +295,18 @@ module.exports = function(grunt) { dest: BUILD_DIR + 'wp-includes/js/tinymce/wp-tinymce.js.gz' } }, + jsvalidate:{ + options:{ + globals: {}, + esprimaOptions:{}, + verbose: false + }, + build: { + files: { + src: BUILD_DIR + '/**/*.js' + } + } + }, watch: { all: { files: [ @@ -344,7 +356,7 @@ module.exports = function(grunt) { // Build task. grunt.registerTask('build', ['clean:all', 'copy:all', 'cssmin:core', 'colors', 'rtl', 'cssmin:rtl', 'cssmin:colors', - 'uglify:core', 'concat:tinymce', 'compress:tinymce', 'clean:tinymce']); + 'uglify:core', 'concat:tinymce', 'compress:tinymce', 'clean:tinymce', 'jsvalidate:build']); // Testing tasks. grunt.registerMultiTask('phpunit', 'Runs PHPUnit tests, including the ajax and multisite tests.', function() { diff --git a/package.json b/package.json index fcb2ad98c5..a41eb46500 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "grunt-contrib-jshint": "~0.7.0", "grunt-cssjanus": "git://github.com/yoavf/grunt-cssjanus.git#e0158f4087d1c4bb5a8d1648a63ef133338b5879", "grunt-sass": "~0.8.0", + "grunt-jsvalidate": "~0.2.2", "matchdep": "~0.1.2" } }