build for commonjs, esm and a standalone bundle.

This commit is contained in:
fiatjaf
2022-12-19 15:46:31 -03:00
parent de8bdd8370
commit 39aca167fb
3 changed files with 28 additions and 15 deletions

View File

@@ -6,7 +6,8 @@
"type": "git",
"url": "https://github.com/fiatjaf/nostr-tools.git"
},
"type": "module",
"main": "cjs/index.js",
"module": "esm/index.js",
"dependencies": {
"@noble/hashes": "^0.5.7",
"@noble/secp256k1": "^1.5.2",
@@ -25,11 +26,10 @@
"nostr"
],
"devDependencies": {
"@esbuild-plugins/node-globals-polyfill": "^0.1.1",
"@types/node": "^18.0.3",
"@typescript-eslint/eslint-plugin": "^5.46.1",
"@typescript-eslint/parser": "^5.46.1",
"esbuild": "^0.14.38",
"esbuild": "0.16.9",
"esbuild-plugin-alias": "^0.2.1",
"eslint": "^8.30.0",
"eslint-plugin-babel": "^5.3.1",
@@ -39,7 +39,7 @@
"typescript": "^4.9.4"
},
"scripts": {
"prepublish": "node build.cjs",
"check-ts": "tsd && node --no-warnings --loader=esm-loader-typescript index.test-d.ts"
"build": "node build.cjs",
"prepublish": "yarn run build"
}
}