diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ecf6df..2c94026 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,4 @@ jobs: - name: Bundle run: bun bundle - name: Run Tests - run: | - bun test:node - bun test:deno - bun test:bun + run: bun run test diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 75310a2..0083a6a 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -62,10 +62,7 @@ jobs: run: bun bundle - name: Run Tests - run: | - bun test:node - bun test:deno - bun test:bun + run: bun run test publish-jsr: needs: build-release diff --git a/README.md b/README.md index d101a3a..92f1db0 100644 --- a/README.md +++ b/README.md @@ -179,16 +179,16 @@ In the cloned repository root directory, run: ### Deno ```shell -bun cli:deno +bun build:cli:deno ``` ### Bun ```shell -bun cli:bun +bun build:cli:bun ``` -The standalone binary can be moved to a directory in your path. +The standalone binary in `./dist/` can be moved to a directory in your path. ## CLI usage examples diff --git a/bun.lockb b/bun.lockb index 8817344..2b053f2 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 849e070..dd07f67 100644 --- a/package.json +++ b/package.json @@ -36,12 +36,14 @@ "check:write": "biome check . --write", "check:ci": "biome ci .", "bundle": "bun bundle.ts", + "test": "run-s test:*", "test:node": "node tests/test.js", "test:deno": "deno run --allow-sys --allow-hrtime tests/test.js && deno run --allow-sys --allow-hrtime tests/test.ts", "test:bun": "bun tests/test.js && bun tests/test.ts", - "cli:node": "npx rimraf tatami && node --experimental-sea-config sea-config.json && npx ncp $(volta which node || n which lts || nvm which node || command -v node) tatami && npx postject tatami NODE_SEA_BLOB tatami.blob --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 && npx rimraf tatami.blob", - "cli:deno": "deno run --allow-env --allow-read --allow-write npm:rimraf tatami && deno compile --allow-read --allow-run --allow-sys --allow-hrtime --output=tatami ./cli.js", - "cli:bun": "bunx rimraf tatami && bun build --compile --minify --sourcemap ./cli.js --outfile tatami" + "build:cli": "run-p build:*", + "build:cli:node": "npx --yes rimraf ./dist/node/tatami && npx --yes mkdirp ./dist/node && node --experimental-sea-config sea-config.json && npx --yes ncp $(volta which node || n which lts || nvm which node || command -v node) ./dist/node/tatami && npx --yes postject ./dist/node/tatami NODE_SEA_BLOB ./dist/node/tatami.blob --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 && npx --yes rimraf ./dist/node/tatami.blob", + "build:cli:deno": "deno run --allow-env --allow-read --allow-write npm:rimraf tatami && deno compile --allow-read --allow-run --allow-sys --allow-hrtime --output=./dist/deno/tatami ./cli.js", + "build:cli:bun": "bunx rimraf ./dist/bun/tatami && bun build --compile --minify --sourcemap ./cli.js --outfile ./dist/bun/tatami" }, "dependencies": { "peowly": "^1.3.2" @@ -53,6 +55,7 @@ "@types/bun": "^1.1.8", "husky": "^9.1.5", "lint-staged": "^15.2.10", + "npm-run-all2": "^6.2.2", "prettier": "^3.3.3" }, "peerDependencies": { diff --git a/sea-config.json b/sea-config.json index f0101a3..b82e6f4 100644 --- a/sea-config.json +++ b/sea-config.json @@ -1,5 +1,5 @@ { "main": "./cli.js", - "output": "./tatami.blob", + "output": "./dist/node/tatami.blob", "disableExperimentalSEAWarning": true }