Skip to content

Commit db8912a

Browse files
Explicitly load Grunt dependencies to remove matchdep dependency
The `matchdep` package is no longer supported, and not really needed here. In the future I may update this to use `load-grunt-tasks`. I'm just not sure the task list is long/unruly enough to warrant an "autoloader."
1 parent 2907d35 commit db8912a

File tree

1 file changed

+27
-22
lines changed

1 file changed

+27
-22
lines changed

Gruntfile.js

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
module.exports = function (grunt) {
2-
const BUILD_DIR = 'build/',
3-
EAS_EXCLUDED_MISC = [
4-
'!**/assets/**',
5-
'!**/bin/**',
6-
'!**/build/**',
7-
'!**/coverage/**',
8-
'!**/node_modules/**',
9-
'!**/tests/**',
10-
'!**/vendor/**',
11-
'!composer.*',
12-
'!Gruntfile.js*',
13-
'!package.json*',
14-
'!package-lock.json*',
15-
'!phpcs.xml*',
16-
'!phpunit.xml*',
17-
'!.*',
18-
'!.*/**',
19-
];
2+
const BUILD_DIR = 'build/';
3+
const EAS_EXCLUDED_MISC = [
4+
'!**/assets/**',
5+
'!**/bin/**',
6+
'!**/build/**',
7+
'!**/coverage/**',
8+
'!**/node_modules/**',
9+
'!**/tests/**',
10+
'!**/vendor/**',
11+
'!composer.*',
12+
'!Gruntfile.js*',
13+
'!package.json*',
14+
'!package-lock.json*',
15+
'!phpcs.xml*',
16+
'!phpunit.xml*',
17+
'!.*',
18+
'!.*/**',
19+
];
2020

21-
// Load tasks.
22-
require('matchdep')
23-
.filterDev(['grunt-*', '!grunt-legacy-util'])
24-
.forEach(grunt.loadNpmTasks);
21+
// Load all Grunt tasks, except `grunt-legacy-util`.
22+
grunt.loadNpmTasks('grunt-checktextdomain');
23+
grunt.loadNpmTasks('grunt-contrib-clean');
24+
grunt.loadNpmTasks('grunt-contrib-concat');
25+
grunt.loadNpmTasks('grunt-contrib-copy');
26+
grunt.loadNpmTasks('grunt-contrib-watch');
27+
grunt.loadNpmTasks('grunt-string-replace');
28+
grunt.loadNpmTasks('grunt-wp-i18n');
29+
grunt.loadNpmTasks('grunt-wp-readme-to-markdown');
2530

2631
// Load legacy utils
2732
grunt.util = require('grunt-legacy-util');

0 commit comments

Comments
 (0)