mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-21 17:11:06 +00:00
specify npm prefix and stylelint configs and adjust ignores
This commit is contained in:
parent
0617b9424b
commit
dbd5a02617
6 changed files with 18 additions and 12 deletions
18
bw-dev
18
bw-dev
|
@ -139,19 +139,21 @@ case "$CMD" in
|
|||
docker-compose run --rm dev-tools black celerywyrm bookwyrm
|
||||
;;
|
||||
prettier)
|
||||
docker-compose run --rm dev-tools npx prettier --write bookwyrm/static/js/*.js
|
||||
docker-compose run --rm dev-tools npm exec --prefix=dev-tools/ -- prettier \
|
||||
--write bookwyrm/static/js/*.js
|
||||
;;
|
||||
stylelint)
|
||||
docker-compose run --rm dev-tools npx stylelint \
|
||||
bookwyrm/static/css/bookwyrm.scss bookwyrm/static/css/bookwyrm/**/*.scss --fix \
|
||||
--config dev-tools/.stylelintrc.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
|
||||
;;
|
||||
formatters)
|
||||
docker-compose run --rm dev-tools black celerywyrm bookwyrm
|
||||
docker-compose run --rm dev-tools npx prettier --write bookwyrm/static/js/*.js
|
||||
docker-compose run --rm dev-tools npx stylelint \
|
||||
bookwyrm/static/css/bookwyrm.scss bookwyrm/static/css/bookwyrm/**/*.scss --fix \
|
||||
--config dev-tools/.stylelintrc.js
|
||||
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=dev-tools/ -- stylelint \
|
||||
--fix --config=dev-tools/.stylelintrc.js --ignore-path=dev-tools/.stylelintignore \
|
||||
bookwyrm/static/css
|
||||
;;
|
||||
compilescss)
|
||||
runweb python manage.py compilescss
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
**/vendor/**
|
||||
**/fonts/**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* global module */
|
||||
|
||||
module.exports = {
|
||||
"extends": "stylelint-config-standard",
|
||||
"extends": "stylelint-config-standard-scss",
|
||||
|
||||
"plugins": [
|
||||
"stylelint-order"
|
||||
|
|
|
@ -2,13 +2,14 @@ FROM python:3.9
|
|||
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
RUN mkdir /app
|
||||
WORKDIR /app
|
||||
WORKDIR /app/dev-tools
|
||||
|
||||
COPY package.json requirements.txt .stylelintrc.js .stylelintignore /app/
|
||||
COPY package.json requirements.txt .stylelintrc.js .stylelintignore /app/dev-tools/
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
RUN apt-get update && apt-get install -y curl
|
||||
RUN curl -sL https://deb.nodesource.com/setup_17.x | bash -
|
||||
RUN apt-get install -y nodejs && apt-get clean
|
||||
RUN npm install .
|
||||
|
||||
WORKDIR /app
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
"stylelint-config-recommended": "^7.0.0",
|
||||
"stylelint-config-standard": "^25.0.0",
|
||||
"stylelint-order": "^5.0.0",
|
||||
"stylelint-config-standard-scss": "^3.0.0",
|
||||
"watch": "^0.13.0"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -101,6 +101,7 @@ services:
|
|||
build: dev-tools
|
||||
env_file: .env
|
||||
volumes:
|
||||
- /app/dev-tools/
|
||||
- .:/app
|
||||
volumes:
|
||||
pgdata:
|
||||
|
|
Loading…
Reference in a new issue