Skip to content

Commit 1f91319

Browse files
committed
feat!: publish with "main", distribute src & TS map to src
1 parent 1532d9e commit 1f91319

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"type": "module",
77
"scripts": {
88
"build": "npm run build:js && npm run build:types",
9-
"build:js": "npm_config_yes=true ipjs build --tests",
10-
"build:types": "tsc --emitDeclarationOnly --declarationDir dist/types",
9+
"build:js": "npm_config_yes=true ipjs build --tests --main",
10+
"build:types": "cp tsconfig.json dist && cp -a src vendor dist/ && cd dist && tsc --emitDeclarationOnly --declarationDir types",
1111
"build:vendor": "npm run build:vendor:varint && npm run build:vendor:base-x",
1212
"build:vendor:varint": "npx brrp -x varint > vendor/varint.js",
1313
"build:vendor:base-x": "npx brrp -x @multiformats/base-x > vendor/base-x.js",
@@ -120,6 +120,9 @@
120120
"*": {
121121
"*": [
122122
"types/*"
123+
],
124+
"cjs/src/index.js": [
125+
"types/index.d.ts"
123126
]
124127
}
125128
}

0 commit comments

Comments
 (0)