From e4acf7bec25a1f230ad7d6e52c2988a7bb78c174 Mon Sep 17 00:00:00 2001 From: Ralfs Date: Mon, 24 May 2021 21:49:48 +0300 Subject: [PATCH] Separate tsconfig for tests and prod --- package.json | 2 +- tsconfig.production.js | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 tsconfig.production.js diff --git a/package.json b/package.json index f1f05f5..99c3b0b 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "node": ">=10" }, "scripts": { - "build": "tsc", + "build": "tsc --project tsconfig.production.json", "start": "ts-node src/tests.ts", "clean": "rm -rf lib", "prepare": "run-s clean build", diff --git a/tsconfig.production.js b/tsconfig.production.js new file mode 100644 index 0000000..8083ad6 --- /dev/null +++ b/tsconfig.production.js @@ -0,0 +1,17 @@ +{ + "extends": "@tsconfig/node10/tsconfig.json", + + "compilerOptions": { + "outDir": "./lib", + "allowJs": true, + "checkJs": true, + "declaration": true, + "declarationMap": true, + "noImplicitAny": false, + "resolveJsonModule": true, + "sourceMap": true, + "jsx": "react" + }, + "include": ["./src/**/*"], + "exclude": ["./src/**/*.test.js", "node_modules", "**/node_modules"] +}