Skip to content

Commit

Permalink
fix: commonjs support
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanssen0 committed Jul 31, 2024
1 parent b0e17f6 commit e260ddb
Show file tree
Hide file tree
Showing 10 changed files with 194 additions and 20 deletions.
168 changes: 157 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions packages/ckb-sdk-core/misc/basedirs/lib-esm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

{
"type": "module"
}
4 changes: 4 additions & 0 deletions packages/ckb-sdk-core/misc/basedirs/lib/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

{
"type": "commonjs"
}
9 changes: 6 additions & 3 deletions packages/ckb-sdk-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"homepage": "https://github.com/ckb-js/ckb-sdk-js#readme",
"license": "MIT",
"main": "lib/index.js",
"module": "lib-esm/index.js",
"typings": "lib/index.d.ts",
"type": "module",
"directories": {
"lib": "lib",
"lib-esm": "lib-esm",
Expand Down Expand Up @@ -41,7 +41,7 @@
"url": "git+https://github.com/ckb-js/ckb-sdk-js.git"
},
"scripts": {
"tsc": "tsc --project tsconfig.json && tsc --project tsconfig.esm.json",
"tsc": "tsc --project tsconfig.json && tsc --project tsconfig.esm.json && copyfiles -u 2 misc/basedirs/**/* .",
"test": "../../node_modules/.bin/jest"
},
"bugs": {
Expand All @@ -53,5 +53,8 @@
"@nervosnetwork/ckb-types": "0.109.2",
"tslib": "2.3.1"
},
"gitHead": "ef6e8c929554a1d601a44b1562ffa585a707cc4d"
"gitHead": "ef6e8c929554a1d601a44b1562ffa585a707cc4d",
"devDependencies": {
"copyfiles": "^2.4.1"
}
}
4 changes: 4 additions & 0 deletions packages/ckb-sdk-rpc/misc/basedirs/lib-esm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

{
"type": "module"
}
4 changes: 4 additions & 0 deletions packages/ckb-sdk-rpc/misc/basedirs/lib/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

{
"type": "commonjs"
}
7 changes: 4 additions & 3 deletions packages/ckb-sdk-rpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"homepage": "https://github.com/ckb-js/ckb-sdk-js/packages/ckb-rpc#readme",
"license": "MIT",
"main": "lib/index.js",
"module": "lib-esm/index.js",
"typings": "lib/index.d.ts",
"type": "module",
"directories": {
"lib": "lib",
"lib-esm": "lib-esm",
Expand All @@ -34,7 +34,7 @@
"url": "git+https://github.com/ckb-js/ckb-sdk-js.git"
},
"scripts": {
"tsc": "tsc --project tsconfig.json && tsc --project tsconfig.esm.json",
"tsc": "tsc --project tsconfig.json && tsc --project tsconfig.esm.json && copyfiles -u 2 misc/basedirs/**/* .",
"test": "../../node_modules/.bin/jest",
"doc": "../../node_modules/.bin/typedoc --out docs --mode modules --includeDeclarations --excludeExternals --ignoreCompilerErrors --theme default",
"test:watch": "../../node_modules/.bin/jest --watch"
Expand All @@ -48,7 +48,8 @@
"tslib": "2.3.1"
},
"devDependencies": {
"@nervosnetwork/ckb-types": "0.109.2"
"@nervosnetwork/ckb-types": "0.109.2",
"copyfiles": "^2.4.1"
},
"gitHead": "ef6e8c929554a1d601a44b1562ffa585a707cc4d"
}
4 changes: 4 additions & 0 deletions packages/ckb-sdk-utils/misc/basedirs/lib-esm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

{
"type": "module"
}
4 changes: 4 additions & 0 deletions packages/ckb-sdk-utils/misc/basedirs/lib/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

{
"type": "commonjs"
}
6 changes: 3 additions & 3 deletions packages/ckb-sdk-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"main": "lib/index.js",
"module": "lib-esm/index.js",
"types": "lib/index.d.ts",
"type": "module",
"directories": {
"lib": "lib",
"lib-esm": "lib-esm",
Expand All @@ -35,7 +34,7 @@
"url": "git+https://github.com/ckb-js/ckb-sdk-js.git"
},
"scripts": {
"tsc": "tsc --project tsconfig.json && tsc --project tsconfig.esm.json",
"tsc": "tsc --project tsconfig.json && tsc --project tsconfig.esm.json && copyfiles -u 2 misc/basedirs/**/* .",
"test": "../../node_modules/.bin/jest"
},
"bugs": {
Expand All @@ -50,7 +49,8 @@
},
"devDependencies": {
"@types/bitcoinjs-lib": "5.0.0",
"@types/elliptic": "6.4.12"
"@types/elliptic": "6.4.12",
"copyfiles": "^2.4.1"
},
"gitHead": "ef6e8c929554a1d601a44b1562ffa585a707cc4d"
}

0 comments on commit e260ddb

Please sign in to comment.