Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5cdca22

Browse files
committed
Update build setup
1 parent 264017d commit 5cdca22

File tree

3 files changed

+22
-20
lines changed

3 files changed

+22
-20
lines changed

Procfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
worker: npm run prod:start
1+
worker: npm run prod:build && prod:start

gulpfile.js

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
1-
const gulp = require('gulp');
1+
const gulp = require("gulp");
22
const ts = require("gulp-typescript");
33
const tslint = require("gulp-tslint");
4-
const { resolve } = require("path");
54

65
const tsProject = ts.createProject("tsconfig.json");
76

8-
gulp.task("ts", () => (
9-
tsProject.src()
7+
gulp.task("ts", () =>
8+
tsProject
9+
.src()
1010
.pipe(tsProject())
1111
.js.pipe(gulp.dest("dist"))
12-
));
12+
);
1313

14-
gulp.task('tslint', () => (
15-
tsProject.src()
16-
.pipe(tslint({
17-
formatter: 'verbose'
18-
}))
14+
gulp.task("tslint", () =>
15+
tsProject
16+
.src()
17+
.pipe(
18+
tslint({
19+
formatter: "verbose"
20+
})
21+
)
1922
.pipe(tslint.report())
20-
));
21-
gulp.task('watch', () => (
22-
gulp.watch('src/**/*.ts', ['ts'])
23-
));
23+
);
24+
gulp.task("watch", () => gulp.watch("src/**/*.ts", ["ts"]));
2425

25-
gulp.task("default", [ "ts"]);
26+
gulp.task("default", ["ts"]);

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
"author": "buoyantair <[email protected]>",
77
"license": "MIT",
88
"scripts": {
9-
"start": "nodemon ./dist/main.js",
10-
"build": "gulp watch",
11-
"test": "jest",
12-
"test:watch": "jest --watch",
9+
"start": "npx nodemon ./dist/main.js",
10+
"build": "npx gulp watch",
11+
"test": "npx jest",
12+
"test:watch": "npx jest --watch",
13+
"prod:build":"npx gulp",
1314
"prod:start": "node ./dist/main.js"
1415
},
1516
"dependencies": {

0 commit comments

Comments
 (0)