diff --git a/Gruntfile.js b/Gruntfile.js index 24218fe..ac268a6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -4,6 +4,9 @@ module.exports = function(grunt) { var SOURCE_DIR = 'src/'; var BUILD_DIR = 'build/'; + // Load all the Grunt tasks listed in package.json + require('matchdep').filterDev('grunt-*').forEach( grunt.loadNpmTasks ); + // Project configuration. grunt.initConfig({ clean: { @@ -106,13 +109,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-uglify'); - grunt.loadNpmTasks('grunt-contrib-watch'); - // Register tasks. grunt.registerTask('build', ['clean:all', 'copy:all', 'cssmin:core', 'uglify:core', 'uglify:tinymce']); diff --git a/package.json b/package.json index b12e46f..de70f71 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "license": "GPLv2 or later", "devDependencies": { "grunt": "~0.4.1", + "matchdep": "~0.1.2", "grunt-contrib-clean": "~0.5.0", "grunt-contrib-copy": "~0.4.1", "grunt-contrib-cssmin": "~0.6.1",