mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-25 11:01:12 +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)
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue