diff --git a/bw-dev b/bw-dev index 19ab1a355..57441f013 100755 --- a/bw-dev +++ b/bw-dev @@ -188,31 +188,25 @@ case "$CMD" in ;; prettier) prod_error - $DOCKER_COMPOSE run --rm dev-tools npm exec --prefix dev-tools -- prettier \ - --write bookwyrm/static/js/*.js + $DOCKER_COMPOSE run --rm dev-tools prettier --write bookwyrm/static/js/*.js ;; eslint) prod_error - $DOCKER_COMPOSE run --rm dev-tools npm exec --prefix devtools -- eslint \ - bookwyrm/static --ext .js + $DOCKER_COMPOSE run --rm dev-tools eslint bookwyrm/static --ext .js ;; stylelint) prod_error - $DOCKER_COMPOSE run --rm dev-tools npm exec --prefix dev-tools -- stylelint --fix \ - --config dev-tools/.stylelintrc.js --ignore-path dev-tools/.stylelintignore \ - bookwyrm/static/css + $DOCKER_COMPOSE run --rm dev-tools stylelint --fix bookwyrm/static/css \ + --config dev-tools/.stylelintrc.js --ignore-path dev-tools/.stylelintignore ;; formatters) prod_error runweb pylint bookwyrm/ $DOCKER_COMPOSE run --rm dev-tools black celerywyrm bookwyrm - $DOCKER_COMPOSE run --rm dev-tools npm exec --prefix dev-tools -- prettier \ - --write bookwyrm/static/js/*.js - $DOCKER_COMPOSE run --rm dev-tools npm exec --prefix devtools -- eslint \ - bookwyrm/static --ext .js - $DOCKER_COMPOSE run --rm dev-tools npm exec --prefix dev-tools -- stylelint --fix \ - --config dev-tools/.stylelintrc.js --ignore-path dev-tools/.stylelintignore \ - bookwyrm/static/css + $DOCKER_COMPOSE run --rm dev-tools prettier --write bookwyrm/static/js/*.js + $DOCKER_COMPOSE run --rm dev-tools eslint bookwyrm/static --ext .js + $DOCKER_COMPOSE run --rm dev-tools stylelint --fix bookwyrm/static/css \ + --config dev-tools/.stylelintrc.js --ignore-path dev-tools/.stylelintignore ;; mypy) prod_error diff --git a/dev-tools/Dockerfile b/dev-tools/Dockerfile index 338d96c66..f6a7bb793 100644 --- a/dev-tools/Dockerfile +++ b/dev-tools/Dockerfile @@ -1,6 +1,7 @@ FROM python:3.9 WORKDIR /app/dev-tools +ENV PATH="/app/dev-tools/node_modules/.bin:$PATH" ENV PYTHONUNBUFFERED=1 ENV NPM_CONFIG_UPDATE_NOTIFIER=false ENV PIP_ROOT_USER_ACTION=ignore PIP_DISABLE_PIP_VERSION_CHECK=1