Skip to content

Use concurrently and wait-on for fast incremental builds #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
7 changes: 3 additions & 4 deletions nodemon.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"watch": ["src"],
"ext": "ts",
"ignore": ["src/**/*.spec.ts"],
"exec": "ts-node -r tsconfig-paths/register src/main.ts"
"watch": ["dist"],
"ext": "js",
"exec": "node -r tsconfig-paths/register dist/main.js"
}
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"build": "tsc -p tsconfig.build.json",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "ts-node -r tsconfig-paths/register src/main.ts",
"start:dev": "nodemon",
"start:dev": "concurrently --names \"NODEMON,TSC\" --handle-input \"wait-on dist/main.js && nodemon\" \"tsc -w -p tsconfig.build.json\" ",
"start:debug": "nodemon --config nodemon-debug.json",
"prestart:prod": "rimraf dist && npm run build",
"start:prod": "node dist/main.js",
Expand All @@ -29,11 +29,12 @@
"rxjs": "6.4.0"
},
"devDependencies": {
"@nestjs/testing": "6.1.1",
"@types/express": "4.16.1",
"@types/jest": "24.0.11",
"@types/node": "11.13.4",
"@types/supertest": "2.0.7",
"@nestjs/testing": "6.1.1",
"concurrently": "^4.1.0",
"jest": "24.7.1",
"nodemon": "1.18.11",
"prettier": "1.17.0",
Expand All @@ -42,7 +43,8 @@
"ts-node": "8.1.0",
"tsconfig-paths": "3.8.0",
"tslint": "5.16.0",
"typescript": "3.4.3"
"typescript": "3.4.3",
"wait-on": "^3.2.0"
},
"jest": {
"moduleFileExtensions": [
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "./tsconfig.json",
"exclude": ["node_modules", "test", "**/*spec.ts"]
"exclude": ["node_modules", "dist", "test", "**/*spec.ts"]
}
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"target": "es6",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./"
"baseUrl": "./",
"incremental": true,
},
"exclude": ["node_modules"]
"exclude": ["node_modules", "dist"]
}