forked from cheddar/pivot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
44 lines (33 loc) · 1.07 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
'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('pivot.css'));
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.taskClientBundle());
gulp.task('clean', laborer.taskClean());
gulp.task('all', function(cb) {
runSequence(
'clean' ,
'style',
'server:tsc',
'client:tsc',
'client:bundle',
cb
);
});
gulp.task('watch', ['all'], function() {
watch('./src/client/**/*.scss', function() {
gulp.start('style');
});
watch(['./src/common/**/*.ts', './src/client/**/*.ts', './assets/icons/**'], function() {
runSequence('client:tsc', 'client:bundle');
});
watch(['./src/common/**/*.ts', './src/server/**'], function() {
gulp.start('server:tsc');
});
});