-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gulpfile.js
executable file
·49 lines (42 loc) · 1 KB
/
Gulpfile.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
47
48
49
/**
* Eve-WSpace Gulp entry
* @module evewspace
* @requires gulp
* @requires path
* @requires fs
* @requires auto- plug
*/
const gulp = require('gulp')
, path = require('path')
, fs = require('fs')
, plugins = require('auto-plug')('gulp');
const utils = require('./tasks/utils');
const taskDir = path.join(__dirname, 'tasks');
/**
* Filter the files in the tasks directory to only return javascript
* or coffee-script files.
*
* @param {String} name
* @return {String}
*/
const scriptFilter = function (name) {
if (path.extname(name) === '.js' && name !== 'utils.js') {
return name;
}
}
// Read the task directory and apply the script filter
var Tasks = fs.readdirSync(taskDir).filter(scriptFilter);
// node-require each valid task script
Tasks.forEach(function (task) {
if (task !== 'utils') {
require(path.join(taskDir, task))(gulp, plugins, utils);
}
});
// Set our default Gulp task
gulp.task('default', [
'browserify',
'styles',
'fonts',
'images:static',
'modernizr'
]);