forked from cheddar/pivot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
61 lines (46 loc) · 1.41 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
52
53
54
55
56
57
58
59
60
61
'use strict';
var gulp = require('gulp');
var watch = require('gulp-watch');
var runSequence = require('run-sequence');
var laborer = require('laborer');
gulp.task('style', laborer.taskStyle());
gulp.task('icons', laborer.taskIcons());
gulp.task('client:tsc', laborer.taskClientTypeScript({ declaration: true }));
gulp.task('server:tsc', laborer.taskServerTypeScript({ declaration: true }));
gulp.task('client:test', laborer.taskClientTest());
gulp.task('server:test', laborer.taskServerTest());
gulp.task('client:bundle', laborer.taskClientPack({ showStats: true }));
gulp.task('clean', laborer.taskClean());
gulp.task('all', function(cb) {
runSequence(
'clean' ,
['style', 'icons'],
['server:tsc', 'client:tsc'],
'client:bundle',
cb
);
});
gulp.task('all-bundle', function(cb) {
runSequence(
'clean' ,
['style', 'icons'],
['server:tsc', 'client:tsc'],
cb
);
});
gulp.task('watch', ['all-bundle'], function() {
watch('./src/client/**/*.scss', function() {
gulp.start('style');
});
watch('./src/client/**/*.svg', function() {
gulp.start('icons');
});
watch(['./src/common/**/*.ts', './src/client/**/*.{ts,tsx}', './assets/icons/**'], function() {
runSequence('client:tsc');
});
watch(['./src/common/**/*.ts', './src/server/**'], function() {
gulp.start('server:tsc');
});
laborer.clientPackWatch({ showStats: true })
});
gulp.task('default', ['all']);