Skip to content

Commit

Permalink
feat(uniswapx): add esm build
Browse files Browse the repository at this point in the history
  • Loading branch information
just-toby committed Dec 13, 2024
1 parent ff2be9a commit 8a61942
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 13 deletions.
22 changes: 17 additions & 5 deletions sdks/uniswapx-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@
"ethereum"
],
"license": "MIT",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
"module": "dist/uniswapx-sdk.esm.js",
"main": "./dist/cjs/src/index.js",
"typings": "./dist/types/src/index.d.ts",
"module": "./dist/esm/src/index.js",
"files": [
"dist"
],
"engines": {
"node": ">=10"
},
"scripts": {
"build": "yarn run typechain && tsc -p tsconfig.json",
"clean": "rm -rf dist",
"build": "yarn clean && yarn run typechain && yarn build:cjs && yarn build:esm && yarn build:types",
"build:cjs": "tsc -p tsconfig.cjs.json",
"build:esm": "tsc -p tsconfig.esm.json",
"build:types": "tsc -p tsconfig.types.json",
"lint": "eslint src --ext .ts",
"lint:fix": "eslint src --ext .ts --fix",
"prettier": "prettier \"src/**/*.ts\" --list-different",
Expand Down Expand Up @@ -96,5 +100,13 @@
}
]
]
}
},
"exports": {
".": {
"types": "./dist/types/src/index.d.ts",
"import": "./dist/esm/src/index.js",
"require": "./dist/cjs/src/index.js"
}
},
"sideEffects": false
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"include": [
"src"
],
"include": ["src", "abis"],
"compilerOptions": {
"outDir": "dist",
"rootDir": ".",
"baseUrl": ".",
"target": "es6",
"module": "commonjs",
"importHelpers": true,
"declaration": true,
"sourceMap": true,
Expand All @@ -23,6 +21,7 @@
"moduleResolution": "node",
"resolveJsonModule": true,
"esModuleInterop": true,
"skipLibCheck": true
},
}
"skipLibCheck": true,
"isolatedModules": true
}
}
7 changes: 7 additions & 0 deletions sdks/uniswapx-sdk/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "dist/cjs"
}
}
7 changes: 7 additions & 0 deletions sdks/uniswapx-sdk/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"module": "esnext",
"outDir": "dist/esm"
}
}
8 changes: 8 additions & 0 deletions sdks/uniswapx-sdk/tsconfig.types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"declaration": true,
"emitDeclarationOnly": true,
"outDir": "dist/types"
}
}

0 comments on commit 8a61942

Please sign in to comment.