forked from codyjs/dts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
44 lines (37 loc) · 1.48 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
"use strict";
//******************************************************************************
//* DEPENDENCIES
//******************************************************************************
var gulp = require("gulp"),
tslint = require("gulp-tslint"),
tsc = require("gulp-typescript"),
runSequence = require("run-sequence");
//******************************************************************************
//* LINT
//******************************************************************************
gulp.task("lint", function() {
var config = { emitError: (process.env.CI) ? true : false };
return gulp.src([
"inversify*/*.ts"
])
.pipe(tslint())
.pipe(tslint.report("verbose", config));
});
//******************************************************************************
//* COMPILE
//******************************************************************************
var tsTypeDefinitionsProject = tsc.createProject("tsconfig.json");
gulp.task("build", function() {
return gulp.src("inversify*/*.ts")
.pipe(tsc(tsTypeDefinitionsProject))
.on("error", function (err) {
process.exit(1);
})
.js.pipe(gulp.dest("temp/"));
});
//******************************************************************************
//* DEFAULT
//******************************************************************************
gulp.task("default", function (cb) {
runSequence("lint", "build", cb);
});