Skip to content

Commit 5ff810f

Browse files
committed
bundle using tsup
1 parent c991140 commit 5ff810f

File tree

4 files changed

+594
-95
lines changed

4 files changed

+594
-95
lines changed

package.json

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
{
22
"name": "@pimlico/erc20-paymaster",
3-
"version": "0.0.12",
3+
"version": "0.1.0",
44
"license": "GPL-3.0-or-later",
55
"description": "A permissionless ERC20 Paymaster implementation by Pimlico",
6-
"main": "./dist/cjs/index.js",
7-
"module": "./dist/esm/index.js",
8-
"types": "./dist/types/index.d.ts",
9-
"typings": "./dist/types/index.d.ts",
6+
"main": "./dist/index.js",
7+
"module": "./dist/index.mjs",
8+
"types": "./dist/index.d.ts",
9+
"typings": "./dist/index.d.ts",
1010
"scripts": {
1111
"clean": "rm -rf ./dist && pnpm hardhat clean",
12-
"build": "pnpm run clean && pnpm hardhat compile && pnpm run build:cjs && pnpm run build:esm && pnpm run build:types",
13-
"build:cjs": "tsc --project tsconfig.json --module commonjs --outDir ./dist/cjs --removeComments --verbatimModuleSyntax false && echo > ./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
14-
"build:esm": "tsc --project tsconfig.json --module es2020 --outDir ./dist/esm --removeComments && echo > ./dist/esm/package.json '{\"type\":\"module\"}'",
15-
"build:types": "tsc --project tsconfig.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap"
12+
"build": "pnpm run clean && pnpm hardhat compile && pnpm tsup"
13+
},
14+
"tsup": {
15+
"entry": ["sdk/index.ts"],
16+
"splitting": false,
17+
"sourcemap": true,
18+
"clean": true,
19+
"dts": true,
20+
"format": ["cjs", "esm"]
1621
},
1722
"dependencies": {
1823
"@account-abstraction/contracts": "^0.6.0",
@@ -22,7 +27,8 @@
2227
"@ethersproject/providers": "^5.7.2",
2328
"@openzeppelin/contracts": "^4.8.2",
2429
"ethers": "^5.7.2",
25-
"solady": "^0.0.90"
30+
"solady": "^0.0.90",
31+
"tsup": "^7.1.0"
2632
},
2733
"devDependencies": {
2834
"@nomicfoundation/hardhat-foundry": "^1.0.0",
@@ -50,21 +56,9 @@
5056
],
5157
"exports": {
5258
".": {
53-
"types": "./dist/types/index.d.ts",
54-
"import": "./dist/esm/index.js",
55-
"default": "./dist/cjs/index.js"
56-
},
57-
"./contracts": {
58-
"types": "./dist/types/typechain/index.d.ts",
59-
"import": "./dist/esm/typechain/index.js",
60-
"default": "./dist/cjs/typechain/index.js"
61-
}
62-
},
63-
"typesVersions": {
64-
"*": {
65-
"contracts": [
66-
"./dist/types/typechain/index.d.ts"
67-
]
59+
"types": "./dist/index.d.ts",
60+
"import": "./dist/index.mjs",
61+
"default": "./dist/index.js"
6862
}
6963
}
7064
}

0 commit comments

Comments
 (0)