Skip to content

Commit

Permalink
fix: commonjs support (#639)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanssen0 authored Aug 1, 2024
1 parent b0e17f6 commit b229d4e
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 6 deletions.
3 changes: 3 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,3 @@
{
"type": "module"
}
3 changes: 3 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,3 @@
{
"type": "commonjs"
}
4 changes: 2 additions & 2 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 && npx copyfiles -u 2 misc/basedirs/**/* .",
"test": "../../node_modules/.bin/jest"
},
"bugs": {
Expand Down
3 changes: 3 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,3 @@
{
"type": "module"
}
3 changes: 3 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,3 @@
{
"type": "commonjs"
}
4 changes: 2 additions & 2 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 && npx 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 Down
3 changes: 3 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,3 @@
{
"type": "module"
}
3 changes: 3 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,3 @@
{
"type": "commonjs"
}
3 changes: 1 addition & 2 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 && npx copyfiles -u 2 misc/basedirs/**/* .",
"test": "../../node_modules/.bin/jest"
},
"bugs": {
Expand Down

0 comments on commit b229d4e

Please sign in to comment.