Skip to content

Commit f7177c5

Browse files
committed
🚸 make the library cli-friendly
1 parent fae957e commit f7177c5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

scripts/cli.mjs renamed to cli.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env node
2+
13
/**
24
* This script can be run from the command line using `npm run cli` in order to precompute
35
* the points of a public key and log the result to the console.s

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
"files": [
1010
"dist"
1111
],
12+
"bin": {
13+
"comput256r1": "cli.mjs"
14+
},
1215
"keywords": [
1316
"secp256r1",
1417
"256r1"
@@ -28,7 +31,6 @@
2831
"lint:fix": "eslint src tests --ext .ts --fix",
2932
"prettier": "prettier --check **/*.ts",
3033
"prettier:fix": "prettier --write **/*.ts",
31-
"cli": "npm run build && node scripts/cli.mjs",
3234
"hooks": "lefthook run pre-push",
3335
"hooks:install": "lefthook install",
3436
"hooks:uninstall": "lefthook uninstall"

0 commit comments

Comments
 (0)