Skip to content

Commit

Permalink
Add more build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Nov 22, 2024
1 parent 288fbfa commit 870a904
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Audited & minimal JS implementation of hash functions, MACs and KDFs.
- 🔍 Reliable: chained / sliding window / DoS tests and fuzzing ensure correctness
- 🔁 No unrolled loops: makes it easier to verify and reduces source code size up to 5x
- 🦘 Includes SHA, RIPEMD, BLAKE, HMAC, HKDF, PBKDF, Scrypt, Argon2 & KangarooTwelve
- 🪶 89KB (17KB gzipped) for everything, 10KB (2.5KB gzipped) for single-hash build
- 🪶 47KB for everything, 5KB (2.5KB gzipped) for single-hash build

Take a glance at [GitHub Discussions](https://github.com/paulmillr/noble-hashes/discussions) for questions and support.
The library's initial development was funded by [Ethereum Foundation](https://ethereum.org/).
Expand Down
3 changes: 3 additions & 0 deletions build/input-single.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { bytesToHex, hexToBytes, concatBytes, utf8ToBytes, randomBytes } from '@noble/hashes/utils';
export { sha256 } from '@noble/hashes/sha256';
export const utils = { bytesToHex, hexToBytes, concatBytes, utf8ToBytes, randomBytes };
4 changes: 3 additions & 1 deletion build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
},
"scripts": {
"build:release": "npx esbuild --bundle input.js --outfile=`npx jsbt outfile` --global-name=`npx jsbt global`",
"build:min": "npx esbuild --minify --bundle input.js --outfile=`npx jsbt outfile` --global-name=`npx jsbt global`"
"build:min": "npx esbuild --minify --bundle input.js --outfile=`npx jsbt outfile` --global-name=`npx jsbt global`",
"build:gzip": "gzip -c8 `npx jsbt outfile` > `npx jsbt outfile`.gz",
"build:single": "npx esbuild --minify --bundle input-single.js --outfile=`npx jsbt outfile` --global-name=`npx jsbt global`"
}
}

0 comments on commit 870a904

Please sign in to comment.