From d95eb94867a9ce0ac101e8824720625928b533e5 Mon Sep 17 00:00:00 2001 From: Philipp Fritsche Date: Fri, 22 Oct 2021 10:11:15 +0000 Subject: [PATCH] fix: override build config for types --- package.json | 2 +- tsconfig.build.json | 10 ++++++++++ tsconfig.json | 5 +++-- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 tsconfig.build.json diff --git a/package.json b/package.json index 5cffdf12..24bf3237 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "dist" ], "scripts": { - "build": "kcd-scripts build", + "build": "kcd-scripts build --no-ts-defs && tsc -p tsconfig.build.json", "lint": "kcd-scripts lint", "setup": "npm install && npm run validate -s", "test": "kcd-scripts test", diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 00000000..2051f712 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "include": ["./src"], + "compilerOptions": { + "outDir": "dist", + "noEmit": false, + "declaration": true, + "emitDeclarationOnly": true + } +} diff --git a/tsconfig.json b/tsconfig.json index 6ab097e2..06f18931 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,8 @@ "#src": ["./src/index"], "#src/*": ["./src/*"], "#testHelpers/*": ["./tests/_helpers/*"] - } + }, + "noEmit": true }, - "include": ["./src/**/*", "./tests/**/*"] + "include": ["./src", "./tests"] }