-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
41 lines (36 loc) · 882 Bytes
/
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
var
gulp = require('gulp'),
$ = require('gulp-load-plugins')(),
tsc = require('gulp-tsc'),
shell = require('gulp-shell'),
seq = require('run-sequence'),
del = require('del');
gulp.task('compile-typescript', function () {
gulp
.src('./src/client/**/*.ts')
.pipe($.tsc({
"noImplicitAny": true,
"removeComments": false,
"preserveConstEnums": true,
"target": "ES5",
"sourceMap": true,
"module": "commonjs"
}))
.pipe($.rename({ dirname: '' }))
.pipe(gulp.dest('./src/client/dist/'))
});
gulp.task('webserver', function () {
$.connect.server({
root: './src/client',
livereload: true
});
});
gulp.task('reload', function () {
gulp
.src('./src/client/*.html')
.pipe($.connect.reload());
})
gulp.task('watch-reload', function () {
gulp.watch(['./src/client/*.html'], ['reload']);
});
gulp.task('run-server', ['webserver', 'watch-reload']);