mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-22 09:31:08 +00:00
bw-dev: drop use of npm exec
by setting PATH in Docker image
This commit is contained in:
parent
6392a8e01d
commit
b78d51410b
2 changed files with 9 additions and 14 deletions
22
bw-dev
22
bw-dev
|
@ -188,31 +188,25 @@ case "$CMD" in
|
||||||
;;
|
;;
|
||||||
prettier)
|
prettier)
|
||||||
prod_error
|
prod_error
|
||||||
$DOCKER_COMPOSE run --rm dev-tools npm exec --prefix dev-tools -- prettier \
|
$DOCKER_COMPOSE run --rm dev-tools prettier --write bookwyrm/static/js/*.js
|
||||||
--write bookwyrm/static/js/*.js
|
|
||||||
;;
|
;;
|
||||||
eslint)
|
eslint)
|
||||||
prod_error
|
prod_error
|
||||||
$DOCKER_COMPOSE run --rm dev-tools npm exec --prefix devtools -- eslint \
|
$DOCKER_COMPOSE run --rm dev-tools eslint bookwyrm/static --ext .js
|
||||||
bookwyrm/static --ext .js
|
|
||||||
;;
|
;;
|
||||||
stylelint)
|
stylelint)
|
||||||
prod_error
|
prod_error
|
||||||
$DOCKER_COMPOSE run --rm dev-tools npm exec --prefix dev-tools -- stylelint --fix \
|
$DOCKER_COMPOSE run --rm dev-tools stylelint --fix bookwyrm/static/css \
|
||||||
--config dev-tools/.stylelintrc.js --ignore-path dev-tools/.stylelintignore \
|
--config dev-tools/.stylelintrc.js --ignore-path dev-tools/.stylelintignore
|
||||||
bookwyrm/static/css
|
|
||||||
;;
|
;;
|
||||||
formatters)
|
formatters)
|
||||||
prod_error
|
prod_error
|
||||||
runweb pylint bookwyrm/
|
runweb pylint bookwyrm/
|
||||||
$DOCKER_COMPOSE run --rm dev-tools black celerywyrm bookwyrm
|
$DOCKER_COMPOSE run --rm dev-tools black celerywyrm bookwyrm
|
||||||
$DOCKER_COMPOSE run --rm dev-tools npm exec --prefix dev-tools -- prettier \
|
$DOCKER_COMPOSE run --rm dev-tools prettier --write bookwyrm/static/js/*.js
|
||||||
--write bookwyrm/static/js/*.js
|
$DOCKER_COMPOSE run --rm dev-tools eslint bookwyrm/static --ext .js
|
||||||
$DOCKER_COMPOSE run --rm dev-tools npm exec --prefix devtools -- eslint \
|
$DOCKER_COMPOSE run --rm dev-tools stylelint --fix bookwyrm/static/css \
|
||||||
bookwyrm/static --ext .js
|
--config dev-tools/.stylelintrc.js --ignore-path dev-tools/.stylelintignore
|
||||||
$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
|
|
||||||
;;
|
;;
|
||||||
mypy)
|
mypy)
|
||||||
prod_error
|
prod_error
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
FROM python:3.9
|
FROM python:3.9
|
||||||
WORKDIR /app/dev-tools
|
WORKDIR /app/dev-tools
|
||||||
|
|
||||||
|
ENV PATH="/app/dev-tools/node_modules/.bin:$PATH"
|
||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
ENV NPM_CONFIG_UPDATE_NOTIFIER=false
|
ENV NPM_CONFIG_UPDATE_NOTIFIER=false
|
||||||
ENV PIP_ROOT_USER_ACTION=ignore PIP_DISABLE_PIP_VERSION_CHECK=1
|
ENV PIP_ROOT_USER_ACTION=ignore PIP_DISABLE_PIP_VERSION_CHECK=1
|
||||||
|
|
Loading…
Reference in a new issue