-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
44 lines (39 loc) · 960 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
42
43
44
var gulp = require('gulp');
var tsc = require('gulp-tsc');
var shell = require('gulp-shell');
var runseq = require('run-sequence');
var tslint = require('gulp-tslint');
/** TS Paths **/
var paths = {
tscripts : {
src : ['src/**/*.ts'],
dest : 'dist'
}
};
/** TS Linter **/
gulp.task("compile:lint", () => {
return gulp.src(paths.tscripts.src)
.pipe(tslint({
formatter: "verbose",
emitError: false
}))
.pipe(tslint.report());
});
/** TS Compiler **/
gulp.task("compile:ts", ["compile:lint"], () => {
return gulp.src(paths.tscripts.src)
.pipe(tsc({
module: "commonjs",
emitError: false
}))
.pipe(gulp.dest(paths.tscripts.dest));
});
/** TS Runner **/
gulp.task("run", () => {
gulp.watch(paths.tscripts.src,
runseq("compile:ts", "watch:runner")
);
});
gulp.task("watch:runner", () => { shell.task(["node dist/Chat.js"]); });
/** defaults **/
gulp.task("default", ["compile:ts"]);