-
Notifications
You must be signed in to change notification settings - Fork 29
/
gulpfile.ts
64 lines (55 loc) · 1.46 KB
/
gulpfile.ts
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
62
63
64
/// <reference path="./typings/gulp/gulp.d.ts" />
import * as gulp from "gulp";
let tsconfig = require("gulp-tsconfig-update");
let tslint = require("gulp-tslint");
let shell = require("gulp-shell");
let runSequence = require("run-sequence").use(gulp);
let espower = require("gulp-espower");
let mocha = require("gulp-mocha");
gulp.task("tsconfig", () => {
return gulp
.src([
"./lib/**/*.ts",
"!./lib/**/*.d.ts",
"./test/**/*.ts",
"!./test/**/*.d.ts",
"./typings/**/*.ts",
"./node_modules/commandpost/commandpost.d.ts",
"./node_modules/typescript/lib/lib.es6.d.ts"
])
.pipe(tsconfig());
});
gulp.task("tsc", shell.task([
"node_modules/.bin/tsc -p ./"
]));
gulp.task("tslint", () => {
return gulp
.src([
"./lib/**/*.ts",
"./test/**/*.ts"
])
.pipe(tslint({
config: "/tslint.json"
}))
.pipe(tslint.report("verbose"));
});
gulp.task("espower", () => {
return gulp
.src([
"./test/**/*.js"
])
.pipe(espower())
.pipe(gulp.dest("./espowered"));
});
gulp.task("test", () => {
return gulp
.src([
"./lib/**/*.js",
"!./lib/cli.js",
"./espowered/**/*.js"
])
.pipe(mocha());
});
gulp.task("default", (cb: Function) => {
runSequence("tsconfig", "tsc", "tslint", "espower", "test", cb);
});