diff --git a/package.json b/package.json index 7112246..1cf148f 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "@moduletrace/less-watcher", - "version": "1.0.1", + "version": "1.0.2", "description": "A minimal package to watch less files and compile them to css", "main": "dist/index.js", "bin": { - "lessc-watcher": "dist/index.js", - "less-watcher": "dist/index.js" + "lessc-watcher": "run.sh", + "less-watcher": "run.sh" }, "repository": { "type": "git", diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..3d00a53 --- /dev/null +++ b/run.sh @@ -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