From bcceaa1684b4fde7d5a20d665c558d451aed57c5 Mon Sep 17 00:00:00 2001 From: aquariuslt Date: Sat, 2 May 2020 19:35:40 +0800 Subject: [PATCH] fix: add `tsconfig.build.json` for `nest build` default load --- .../__tests__/application.factory.test.ts | 1 + src/lib/application/files/ts/package.json | 5 ----- .../application/files/ts/tsconfig.build.json | 4 ++++ tsconfig.json | 10 +++++----- tsconfig.lib.json | 19 ++----------------- 5 files changed, 12 insertions(+), 27 deletions(-) create mode 100644 src/lib/application/files/ts/tsconfig.build.json diff --git a/src/lib/application/__tests__/application.factory.test.ts b/src/lib/application/__tests__/application.factory.test.ts index 23df4f6a..cd66712a 100644 --- a/src/lib/application/__tests__/application.factory.test.ts +++ b/src/lib/application/__tests__/application.factory.test.ts @@ -18,6 +18,7 @@ describe('Application Factory', () => { '/project/README.md', '/project/nest-cli.json', '/project/package.json', + '/project/tsconfig.build.json', '/project/tsconfig.json', '/project/src/app.module.ts', '/project/src/main.ts', diff --git a/src/lib/application/files/ts/package.json b/src/lib/application/files/ts/package.json index ac2af566..726a7714 100644 --- a/src/lib/application/files/ts/package.json +++ b/src/lib/application/files/ts/package.json @@ -33,10 +33,6 @@ "@nestjs/testing": "7.0.9", "@commitlint/cli": "8.3.5", "@commitlint/config-conventional": "8.3.4", - "@semantic-release/changelog": "5.0.1", - "@semantic-release/exec": "5.0.0", - "@semantic-release/git": "9.0.0", - "@semantic-release/npm": "7.0.5", "@types/express": "4.17.6", "@types/jest": "25.2.1", "@types/node": "13.13.4", @@ -53,7 +49,6 @@ "prettier": "2.0.5", "pretty-quick": "2.0.1", "supertest": "4.0.2", - "semantic-release": "17.0.7", "ts-jest": "25.4.0", "ts-loader": "7.0.2", "ts-node": "8.9.1", diff --git a/src/lib/application/files/ts/tsconfig.build.json b/src/lib/application/files/ts/tsconfig.build.json new file mode 100644 index 00000000..61fda1c5 --- /dev/null +++ b/src/lib/application/files/ts/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["node_modules", "dist", "**/*/__tests__/**"] +} diff --git a/tsconfig.json b/tsconfig.json index 0cf82146..6f7d6ad7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,5 @@ { "compilerOptions": { - "module": "commonjs", "declaration": true, "removeComments": true, "noLib": false, @@ -8,12 +7,13 @@ "resolveJsonModule": true, "experimentalDecorators": true, "noImplicitAny": false, - "target": "es6", "sourceMap": false, + "skipLibCheck": true, + "module": "commonjs", + "target": "es6", "outDir": "./dist", - "rootDir": "./src", - "skipLibCheck": true + "rootDir": "./src" }, "include": ["src/**/*"], - "exclude": ["node_modules", "src/**/*.test.ts"] + "exclude": ["node_modules", "dist"] } diff --git a/tsconfig.lib.json b/tsconfig.lib.json index 250a7612..85d434f1 100644 --- a/tsconfig.lib.json +++ b/tsconfig.lib.json @@ -1,19 +1,4 @@ { - "compilerOptions": { - "module": "commonjs", - "declaration": true, - "removeComments": true, - "noLib": false, - "emitDecoratorMetadata": true, - "resolveJsonModule": true, - "experimentalDecorators": true, - "noImplicitAny": false, - "skipLibCheck": true, - "sourceMap": false, - "target": "es6", - "outDir": "./dist", - "rootDir": "./src" - }, - "include": ["src/index.ts", "src/lib"], - "exclude": ["node_modules", "src/**/*/files/**", "src/**/*.test.ts"] + "extends": "./tsconfig.json", + "exclude": ["node_modules", "dist", "**/*/files/**", "**/*/__tests__/**"] }