Use matchdep for Grunt tasks.
props kadamwhite. fixes #24980. git-svn-id: https://develop.svn.wordpress.org/trunk@25243 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0877a3eda4
commit
0e79ec02a6
13
Gruntfile.js
13
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']);
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user