-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
51 lines (40 loc) · 1.05 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
50
51
'use strict';
/* global require, console*/
var gulp = require('gulp');
var runSequence = require('run-sequence');
var config = require('./config');
[
'clean',
'cloudfront',
'copy',
'deploy',
'format',
// 'iconfont',
// 'iconsprite',
'lint',
'localtunnel',
// 'sass',
// 'serve',
// 'sketch',
'webpack',
].map(function(task) { require('./gulp_tasks/' + task + '.js')(gulp, config);});
gulp.task('default', ['server']);
gulp.task('prepare', function(callback) {
runSequence('clean', ['copy'], callback);
});
gulp.task('watch', function(callback) {
runSequence(['copy:watch', 'lint:watch'], callback);
});
gulp.task('serve', function(callback) {
runSequence(['webpack:server', 'localtunnel'], callback);
});
// Batch, Public Tasks
gulp.task('server', function(callback) {
runSequence('prepare', 'watch', 'serve', callback);
});
gulp.task('build', function(callback) {
runSequence('prepare', 'webpack', callback);
});
gulp.task('deploy', function(callback) {
runSequence('build', 'gh:deploy', 'cloudfront', callback);
});