-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
26 lines (22 loc) 路 719 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
const gulp = require("gulp");
const ts = require("gulp-typescript");
const nodemon = require("gulp-nodemon");
const JSON_FILES = ["src/*.json", "src/**/*.json"];
// pull in the project TypeScript config
const tsProject = ts.createProject("tsconfig.json");
gulp.task("build", () => {
const tsResult = tsProject.src().pipe(tsProject());
gulp.src(JSON_FILES).pipe(gulp.dest("dist"));
return tsResult.js.pipe(gulp.dest("dist"));
});
gulp.task("start", ["build"], function(done) {
nodemon({
script: "dist/src/index.js",
ext: "ts json",
env: { NODE_ENV: "development" },
done: done,
tasks: ["build"],
ignore: ["dist/", "node_modules/"]
});
});
gulp.task("default", ["watch", "assets"]);