Skip to content

Commit

Permalink
add cjs support
Browse files Browse the repository at this point in the history
  • Loading branch information
baryon2 committed Apr 18, 2024
1 parent b2f0160 commit e1b774d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@leapwallet/leap-keychain",
"version": "0.2.3",
"version": "0.2.4-beta.1",
"description": "A javascript library for crypto key management",
"scripts": {
"test": "jest",
Expand All @@ -18,7 +18,7 @@
"doc:build": "yarn doc",
"doc:watch": "yarn doc --watch",
"prepublish": "yarn build",
"build": "tsc",
"build": "tsc -p tsconfig-browser.json && tsc -p tsconfig-node.json",
"test:coverage": "jest --coverage"
},
"jest": {
Expand All @@ -29,7 +29,7 @@
"/dist/"
]
},
"types": "dist/src/index.d.ts",
"types": "dist/browser/src/index.d.ts",
"license": "MIT",
"repository": "leapwallet/leap-keychain",
"keywords": [
Expand All @@ -41,11 +41,11 @@
"author": "Leap Wallet <[email protected]> (https://leapwallet.io)",
"bugs": "https://github.com/leapwallet/leap-keychain/issues",
"homepage": "https://github.com/leapwallet/leap-keychain#readme",
"main": "dist/src/index.js",
"files": [
"dist/src/"
],
"browser": "dist/src/index.js",
"main": "dist/node/src/index.js",
"browser": "dist/browser/src/index.js",
"dependencies": {
"@ethersproject/bytes": "5.7.0",
"@ethersproject/hdnode": "5.7.0",
Expand Down
6 changes: 6 additions & 0 deletions tsconfig-browser.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"outDir": "dist/browser"
}
}
7 changes: 7 additions & 0 deletions tsconfig-node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"outDir": "dist/node",
"module": "CommonJS"
}
}

0 comments on commit e1b774d

Please sign in to comment.