This commit is contained in:
Benjamin Toby 2025-01-16 07:47:08 +01:00
parent ba2cd9d765
commit 2c800d507e
2 changed files with 13 additions and 3 deletions

View File

@ -1,11 +1,11 @@
{ {
"name": "@moduletrace/batchrun", "name": "@moduletrace/batchrun",
"version": "1.0.3", "version": "1.0.4",
"description": "Run and manage multiple processes concurrently in one terminal", "description": "Run and manage multiple processes concurrently in one terminal",
"main": "dist/index.js", "main": "dist/index.js",
"bin": { "bin": {
"batch-run": "dist/index.js", "batch-run": "run.sh",
"batchrun": "dist/index.js" "batchrun": "run.sh"
}, },
"scripts": { "scripts": {
"build:binary": "bun build --compile --minify --sourcemap --bytecode ./index.js --outfile bin/batchrun" "build:binary": "bun build --compile --minify --sourcemap --bytecode ./index.js --outfile bin/batchrun"

10
run.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
if command -v bun >/dev/null 2>&1; then
exec bun dist/index.js "$@"
elif command -v node >/dev/null 2>&1; then
exec node dist/index.js "$@"
else
echo "Neither Bun nor Node.js is installed."
exit 1
fi