support ESM (#42)

* support ESM

* Optimize
This commit is contained in:
gkgoat
2026-07-17 15:44:06 +08:00
committed by GitHub
parent d1ab318829
commit 83e468af79
5 changed files with 2748 additions and 854 deletions
+4 -1
View File
@@ -3,10 +3,13 @@
"version": "0.9.3",
"description": "A simple SHA-3 / Keccak / Shake hash function for JavaScript supports UTF-8 encoding.",
"main": "src/sha3.js",
"module": "build/sha3.mjs",
"devDependencies": {
"@rollup/plugin-commonjs": "^28.0.5",
"expect.js": "~0.3.1",
"mocha": "~10.2.0",
"nyc": "^15.1.0",
"rollup": "^4.43.0",
"tiny-worker": "^2.3.0",
"uglify-js": "^3.1.9"
},
@@ -14,7 +17,7 @@
"test": "nyc mocha tests/node-test.js",
"report": "nyc --reporter=html --reporter=text mocha tests/node-test.js",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"build": "uglifyjs src/sha3.js -c -m --comments --output build/sha3.min.js"
"build": "npx rollup -c && uglifyjs src/sha3.js -c -m --comments --output build/sha3.min.js"
},
"repository": {
"type": "git",