From 0e79ec02a63362c49a7e44fdbb3a0ab6dde07d0d Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 4 Sep 2013 20:50:29 +0000 Subject: [PATCH] Use matchdep for Grunt tasks. props kadamwhite. fixes #24980. git-svn-id: https://develop.svn.wordpress.org/trunk@25243 602fd350-edb4-49c9-b593-d223f7449a82 --- Gruntfile.js | 13 +++---------- package.json | 3 ++- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index b91036b262..ffc3190d39 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -4,6 +4,9 @@ module.exports = function(grunt) { var SOURCE_DIR = 'src/'; var BUILD_DIR = 'build/'; + // Load tasks. + require('matchdep').filterDev('grunt-*').forEach( grunt.loadNpmTasks ); + // Project configuration. grunt.initConfig({ clean: { @@ -154,16 +157,6 @@ module.exports = function(grunt) { } }); - // Load tasks. - grunt.loadNpmTasks('grunt-contrib-clean'); - grunt.loadNpmTasks('grunt-contrib-copy'); - grunt.loadNpmTasks('grunt-contrib-cssmin'); - grunt.loadNpmTasks('grunt-contrib-qunit'); - grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.loadNpmTasks('grunt-contrib-compress'); - grunt.loadNpmTasks('grunt-contrib-concat'); - // Register tasks. grunt.registerTask('build', ['clean:all', 'copy:all', 'cssmin:core', 'uglify:core', 'uglify:tinymce', 'concat:tinymce', 'compress:tinymce', 'clean:tinymce']); diff --git a/package.json b/package.json index d4408e2fa9..9a72ae1e34 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "grunt-contrib-uglify": "~0.2.2", "grunt-contrib-watch": "~0.5.1", "grunt-contrib-compress": "~0.5.2", - "grunt-contrib-concat": "~0.3.0" + "grunt-contrib-concat": "~0.3.0", + "matchdep": "~0.1.2" } }