define-alpine-the-sequel/npmrun

11 lines
199 B
Text
Raw Normal View History

2023-02-20 18:27:58 +00:00
#!/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"