From 3cdad0765eeec2f25c1bc344eb3639fd1d8a7962 Mon Sep 17 00:00:00 2001 From: David Colon <38386583+Da-Colon@users.noreply.github.com> Date: Wed, 24 Jul 2024 20:56:40 -0400 Subject: [PATCH] move file into `publish` directory --- package.json | 1 + scripts/prepublish.sh | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c8145fe7..029580f7 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "contracts", "!contracts/mock" ], + "main": "publish/index.js", "repository": { "type": "git", "url": "git+https://github.com/decentdao/fractal-contracts.git" diff --git a/scripts/prepublish.sh b/scripts/prepublish.sh index e0f3d9c9..6729ecd5 100755 --- a/scripts/prepublish.sh +++ b/scripts/prepublish.sh @@ -6,7 +6,6 @@ npm run test npx hardhat export --export-all deployments.json -rm index.ts rm -rf publish && mkdir publish # Step 1: Remove the `abi`, `name`, and `chainId` keys @@ -30,11 +29,11 @@ rm abis.json rm deployments.json -cat << EOF > index.ts +cat << EOF > publish/index.ts import abis from "./publish/abis"; import addresses from "./publish/addresses"; export { abis, addresses }; EOF # Run TypeScript compilation -tsc index.ts +tsc publish/index.ts --outDir publish