From 58b7c54a209a6eb42d5f7dfc64d729e90907da81 Mon Sep 17 00:00:00 2001 From: Li Zhineng Date: Thu, 24 Jul 2025 10:00:19 +0800 Subject: separate tsconfig for IDE support and build --- package.json | 2 +- tsconfig.build.json | 4 ++++ tsconfig.json | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 tsconfig.build.json diff --git a/package.json b/package.json index ac8c408..cae17aa 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { - "build": "tsc", + "build": "tsc --project tsconfig.build.json", "test": "jest", "test:watch": "jest --watch", "test:types": "tsd --files tests/**/*.test-d.ts", diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..b90fc83 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "include": ["src"] +} diff --git a/tsconfig.json b/tsconfig.json index 6b51bae..9a1c0e7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,6 +15,5 @@ "./node_modules/miniprogram-api-typings" ] }, - "include": ["src"], - "exclude": ["*.test.ts", "*.test-d.ts"] + "include": ["src", "tests"] } -- cgit v1.2.3