Skip to content

Commit f5bccc5

Browse files
committed
Added grunt tasks autoloading
1 parent e0ed4ba commit f5bccc5

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

Gruntfile.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,11 @@ module.exports = function (grunt) {
1111
path = require('path'),
1212
themes = require('./dev/tools/grunt/configs/themes'),
1313
configDir = './dev/tools/grunt/configs',
14-
taskDir = './dev/tools/grunt/tasks';
14+
tasks = grunt.file.expand('./dev/tools/grunt/tasks/*');
1515

16-
[
17-
taskDir + '/mage-minify',
18-
taskDir + '/deploy',
19-
taskDir + '/black-list-generator',
20-
taskDir + '/clean-black-list',
21-
taskDir + '/static',
22-
'time-grunt'
23-
].forEach(function (task) {
16+
tasks = _.map(tasks, function(task){ return task.replace('.js', '') });
17+
18+
tasks.forEach(function (task) {
2419
require(task)(grunt);
2520
});
2621

0 commit comments

Comments
 (0)