Merge pull request #2279 from alixander/npm-polish

d2js: NPM polish
This commit is contained in:
Alexander Wang 2025-01-12 11:58:58 -07:00 committed by GitHub
commit 7e3ae79797
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -11,8 +11,9 @@ if [ ! -f ./d2js/js/wasm/d2.wasm ]; then
echoerr "Error: d2.wasm is missing" echoerr "Error: d2.wasm is missing"
exit 1 exit 1
else else
stat --printf="Size: %s bytes\n" ./d2js/js/wasm/d2.wasm || ls -lh ./d2js/js/wasm/d2.wasm echo "d2.wasm exists. Size:"
ls -lh ./d2js/js/wasm/d2.wasm | awk '{print $5}'
fi fi
cd d2js/js cd d2js/js
sh_c bun run build sh_c bun build.js

View file

@ -28,9 +28,9 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"build": "bun build.js", "build": "./make.sh build",
"test": "bun test test/unit", "test": "bun test test/unit",
"test:integration": "bun run build && bun test test/integration", "test:integration": "bun test test/integration",
"test:all": "bun run test && bun run test:integration", "test:all": "bun run test && bun run test:integration",
"dev": "bun --watch dev-server.js", "dev": "bun --watch dev-server.js",
"prepublishOnly": "./make.sh" "prepublishOnly": "./make.sh"