-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.babel.js
37 lines (34 loc) · 995 Bytes
/
gulpfile.babel.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
const gulp = require('gulp'),
wrench = require('wrench'),
gutil = require('gulp-util'),
runSequence = require('run-sequence');
const options = {
appName: 'testing',
src: 'src',
dist: 'dist',
tmp: '.tmp',
js: '.tmp/**/*.js',
html: '.tmp/**/*.html',
css: '.tmp/**/*.css',
ts: 'src/**/*.ts',
jade: 'src/**/*.jade',
less: 'src/**/*.less',
indexHtml: 'src/*.html',
tmpIndexHtml: '.tmp/*.html',
partials: '.tmp/partials',
fonts: 'dist/fonts',
wiredep: {directory: 'bower_components'},
additionalTypes: [
'es6-promise'
],
plumberHandler: {
errorHandler: function (err) {
gutil.log(gutil.colors.red(`Error: [${err.plugin}]`), err.message);
this.emit('end');
}
}
};
wrench.readdirSyncRecursive('./gulp')
.filter(file => (/\.(js)$/i).test(file))
.map(file => require(`./gulp/${file}`)(options));
gulp.task('default', cb => runSequence('clean', 'build', cb));