Files
commafeed-podcasts/bs/test
T
2026-04-24 14:03:17 +02:00

36 lines
599 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail # this can be harmful, see https://www.youtube.com/watch?v=4Jo3Ml53kvc
. bs/.common || {
echo 'Please run this script from the project root directory' >&2;
exit 1;
}
# depends on
declare -r lint='bs/lint'
declare -r wtr='node_modules/.bin/wtr'
help(){
if ! isHelp "${@}"; then return 0; fi
echoReadmeInfo
cat <<EOF
Options:
--watch, -w Runs in watch mode
EOF
$wtr --help
exit 0
}
main(){
help "$1"
if [[ "$1" != "--watch" ]]; then
$lint
$wtr "$@" --coverage
exit
fi
$lint --watch --preserveWatchOutput &
$wtr "${*}" &
wait
}
main "$@"