From 9b9de4ee1f4dac997d7158567acbafda6ef3c448 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 17 Jan 2014 18:14:15 +0000 Subject: [PATCH] Add `jsvalidate` as a dependency to the build. To get the new module, run `npm install` in the root of the project. Fixes #26615. Props jorbin. git-svn-id: https://develop.svn.wordpress.org/trunk@26977 602fd350-edb4-49c9-b593-d223f7449a82 --- Gruntfile.js | 14 +++++++++++++- package.json | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) 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" } }