forked from inversify/inversify-basic-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
45 lines (39 loc) · 1.37 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
45
"use strict";
//******************************************************************************
//* DEPENDENCIES
//******************************************************************************
var gulp = require("gulp"),
tslint = require("gulp-tslint"),
tsc = require("gulp-typescript");
//******************************************************************************
//* LINT
//******************************************************************************
gulp.task("lint", function () {
var config = { formatter: "verbose" };
return gulp.src([
"src/**/**.ts"
])
.pipe(tslint(config))
.pipe(tslint.report());
});
//******************************************************************************
//* BUILD
//******************************************************************************
var tstProject = tsc.createProject("tsconfig.json", { typescript: require("typescript") });
gulp.task("build", function () {
return gulp.src([
"src/**/*.ts"
])
.pipe(tstProject())
.on("error", function (err) {
process.exit(1);
})
.js.pipe(gulp.dest("dist/"));
});
//******************************************************************************
//* DEFAULT
//******************************************************************************
gulp.task("default", gulp.series(
"lint",
"build",
));