-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathslushfile.js
46 lines (37 loc) · 973 Bytes
/
slushfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* slush-asponte
* https://github.com/morrissinger/slush-asponte
*
* Copyright (c) 2015, Morris Singer
* Licensed under the MIT license.
*/
'use strict';
var gulp = require('gulp');
(function () {
var includeAll = require('include-all');
/**
* Loads task modules from a relative path.
*/
function loadTasks (relPath) {
return includeAll({
dirname: require('path').resolve(__dirname, relPath),
filter: /(.+)\.js$/
}) || {};
}
/**
* Invokes the function from a Gulp configuration module with
* a single argument - the `gulp` object.
*/
function addTasks (tasks) {
for (var taskName in tasks) {
if (tasks.hasOwnProperty(taskName)) {
tasks[taskName](gulp);
}
}
}
/**
* Add all Gulp tasks to the gulpfile.
*/
addTasks(loadTasks('generators/'));
})();
gulp.task('default', ['app']);