define-alpine-the-sequel/npmrun
2023-02-20 15:27:58 -03:00

10 lines
199 B
Bash
Executable file

#!/bin/sh
script="$1"
if test -z "$script"; then
echo "No script set"
exit 1
fi
run="$(jq -r ".scripts[\"${script}\"]" < package.json)"
echo "> $run"
PATH="./node_modules/.bin:$PATH" sh -c "$run"