-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
executable file
·37 lines (32 loc) · 982 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
var gulp = require("gulp");
var ts = require("gulp-typescript");
var watch = require("gulp-watch");
var tsProject = ts.createProject("tsconfig.json");
var tslint = require("gulp-tslint");
var exec = require('child_process').exec;
gulp.task("default", function () {
return tsProject.src()
.pipe(tsProject())
.on("error", (err) => console.error(err))
.js.pipe(gulp.dest("dist"));
});
gulp.task("watch", function () {
return watch('api/**/*.ts', { ignoreInitial: false })
.pipe(tsProject())
.js.pipe(gulp.dest("dist"));
});
gulp.task("linter", function () {
return tsProject.src()
.pipe(tslint({formatter: "verbose"}))
.pipe(tslint.report())
});
gulp.task("test", function () {
gulp.src("dist/test/**")
.pipe(gulp.dest('test'));
});
gulp.task("seed", function() {
exec('node dist/components/seed/index.js', function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
});
})