From 9d3e266185c1d61b45550054335b6198a1f6592f Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Wed, 5 Oct 2022 15:40:38 -0700 Subject: [PATCH] build: prepack to build types --- packages/bundle-source/jsconfig.build.json | 10 ++++++++++ packages/bundle-source/jsconfig.json | 13 +++++++++++-- packages/bundle-source/package.json | 3 +++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 packages/bundle-source/jsconfig.build.json diff --git a/packages/bundle-source/jsconfig.build.json b/packages/bundle-source/jsconfig.build.json new file mode 100644 index 0000000000..13018509fd --- /dev/null +++ b/packages/bundle-source/jsconfig.build.json @@ -0,0 +1,10 @@ +{ + "extends": "./jsconfig.json", + "compilerOptions": { + "noEmit": false, + "declaration": true, + "emitDeclarationOnly": true, + "declarationMap": true + }, + "exclude": ["test/"] +} diff --git a/packages/bundle-source/jsconfig.json b/packages/bundle-source/jsconfig.json index 63776968c1..d1bd752566 100644 --- a/packages/bundle-source/jsconfig.json +++ b/packages/bundle-source/jsconfig.json @@ -2,10 +2,19 @@ "compilerOptions": { "target": "esnext", "module": "esnext", + // "checkJs": true, "noEmit": true, "downlevelIteration": true, "strictNullChecks": true, - "moduleResolution": "node" + "moduleResolution": "node", + "types": [ + "node", + ] }, - "include": ["*.js", "*.ts", "src/**/*.js", "src/**/*.ts"] + "include": [ + "*.js", + "*.ts", + "src/**/*.js", + "src/**/*.ts" + ] } diff --git a/packages/bundle-source/package.json b/packages/bundle-source/package.json index b826cb5825..8c3b223051 100644 --- a/packages/bundle-source/package.json +++ b/packages/bundle-source/package.json @@ -14,6 +14,9 @@ }, "scripts": { "build": "exit 0", + "clean": "tsc --build jsconfig.build.json --clean", + "prepack": "tsc --build jsconfig.build.json", + "postpack": "yarn clean", "test": "ava", "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", "test:xs": "exit 0",