-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
38 lines (32 loc) · 950 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
const del = require("del");
const eslint = require("gulp-eslint");
const gulp = require("gulp");
const tslint = require("gulp-tslint");
const typescript = require("gulp-typescript");
const ts_project = typescript.createProject("tsconfig.json");
gulp.task("build", function () {
return gulp.src("src/**/*.ts")
.pipe(ts_project())
.pipe(gulp.dest("build/"));
});
gulp.task("clean", function () {
return del([
"build/",
"log/"
]);
});
gulp.task("lint:javascript", function () {
return gulp.src("src/**/*.js")
.pipe(eslint(".eslintrc"))
.pipe(eslint.failAfterError());
});
gulp.task("lint:typescript", function () {
return gulp.src("src/**/*.ts")
.pipe(tslint({ configuration: "tslint.json" }))
.pipe(tslint.default.report({
summarizeFailureOutput: true,
emitError: true
}));
});
gulp.task("lint", ["lint:javascript", "lint:typescript"]);
gulp.task("default", ["build"]);