From 253e64b8961850688b96662ee11837cec0a3f324 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Fri, 15 Mar 2024 06:27:08 +0000 Subject: [PATCH] chore: refactored postbuild to use tsup and emit declarations --- packages/abi-typegen/package.json | 2 +- packages/abi-typegen/tsup.config.dts.ts | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 packages/abi-typegen/tsup.config.dts.ts diff --git a/packages/abi-typegen/package.json b/packages/abi-typegen/package.json index b2b4213afe3..a00c86a235c 100644 --- a/packages/abi-typegen/package.json +++ b/packages/abi-typegen/package.json @@ -42,7 +42,7 @@ "pretest": "pnpm build:forc", "build": "tsup", "build:forc": "pnpm fuels-forc build -p test/fixtures/forc-projects --release", - "postbuild": "tsx ../../scripts/postbuild.ts" + "postbuild": "tsup --config tsup.config.dts.ts" }, "license": "Apache-2.0", "dependencies": { diff --git a/packages/abi-typegen/tsup.config.dts.ts b/packages/abi-typegen/tsup.config.dts.ts new file mode 100644 index 00000000000..a687e896e04 --- /dev/null +++ b/packages/abi-typegen/tsup.config.dts.ts @@ -0,0 +1,13 @@ +import type { Options } from 'tsup'; + +import tsupDefaults from './tsup.config'; + +const configs: Options = { + ...tsupDefaults, + tsconfig: 'tsconfig.dts.json', + 'sourcemap': true, + 'dts': true, + clean: false +}; + +export default configs;