From 21ecbc1d317f9f14ba251856a81c9b79686f484e Mon Sep 17 00:00:00 2001 From: Vincent Geddes Date: Fri, 28 Jul 2023 20:07:34 +0100 Subject: [PATCH] improve contract-types package --- core/packages/contract-types/.gitignore | 3 ++- core/packages/contract-types/package.json | 4 ++-- core/packages/contract-types/tsconfig.json | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/core/packages/contract-types/.gitignore b/core/packages/contract-types/.gitignore index a75d7b0fb4..546d0e5d6e 100644 --- a/core/packages/contract-types/.gitignore +++ b/core/packages/contract-types/.gitignore @@ -1,3 +1,4 @@ node_modules dist -types/ +src/ +tsconfig.tsbuildinfo diff --git a/core/packages/contract-types/package.json b/core/packages/contract-types/package.json index 2bd84149cf..73bbf5a9ac 100644 --- a/core/packages/contract-types/package.json +++ b/core/packages/contract-types/package.json @@ -9,10 +9,10 @@ "directory": "core/packages/contract-types" }, "main": "dist/index.js", - "types": "types/index.ts", + "types": "dist/index.d.ts", "scripts": { "build": "tsc", - "typechain": "rm -rf types && npx typechain --target ethers-v5 '../contracts/out/**/!(*.t|test).sol/!(*.abi).json' --out-dir types" + "typechain": "typechain --target ethers-v5 '../../../contracts/out/?(IGateway.sol|BeefyClient.sol)/!(*.abi).json' --out-dir src" }, "devDependencies": { "@types/node": "^18.13.0", diff --git a/core/packages/contract-types/tsconfig.json b/core/packages/contract-types/tsconfig.json index 23e0290bd2..56a5474ebb 100644 --- a/core/packages/contract-types/tsconfig.json +++ b/core/packages/contract-types/tsconfig.json @@ -12,7 +12,7 @@ "declaration": true, "declarationMap": true, "baseUrl": ".", - "rootDir": "types", + "rootDir": "src", "noEmitOnError": true, "skipLibCheck": true, "allowJs": true @@ -21,6 +21,6 @@ "require": ["tsconfig-paths/register"] }, "exclude": ["node_modules", "dist"], - "include": ["types/**/*.ts"], + "include": ["src/**/*.ts"], "references": [] }