build: build transmission-web with npm instead of yarn (#4637)

This commit is contained in:
Charles Kerr
2023-01-22 14:47:59 -06:00
committed by GitHub
parent 7367d465b5
commit 53815e5eb3
8 changed files with 13032 additions and 4910 deletions
+4 -5
View File
@@ -77,12 +77,11 @@ fi
# format JS
cd "${root}/web" || exit 1
yarn_args='--silent --no-progress --non-interactive'
yarn_lint_args="$([ -n "$fix" ] && echo 'lint:fix' || echo 'lint')"
if ! yarn $yarn_args install; then
[ -n "$fix" ] || echo 'JS code could not be checked -- "yarn install" failed'
npm_lint_args="$([ -n "$fix" ] && echo 'lint:fix' || echo 'lint')"
if ! npm install &>/dev/null; then
[ -n "$fix" ] || echo 'JS code could not be checked -- "npm install" failed'
exitcode=1
elif ! yarn $yarn_args $yarn_lint_args; then
elif ! npm run $npm_lint_args &>/dev/null; then
[ -n "$fix" ] || echo 'JS code needs formatting'
exitcode=1
fi