mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-22 09:31:08 +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
|
docker-compose run --rm dev-tools black celerywyrm bookwyrm
|
||||||
;;
|
;;
|
||||||
prettier)
|
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)
|
stylelint)
|
||||||
docker-compose run --rm dev-tools npx stylelint \
|
docker-compose run --rm dev-tools npm exec --prefix=dev-tools/ -- stylelint \
|
||||||
bookwyrm/static/css/bookwyrm.scss bookwyrm/static/css/bookwyrm/**/*.scss --fix \
|
--fix --config=dev-tools/.stylelintrc.js --ignore-path=dev-tools/.stylelintignore \
|
||||||
--config dev-tools/.stylelintrc.js
|
bookwyrm/static/css
|
||||||
;;
|
;;
|
||||||
formatters)
|
formatters)
|
||||||
docker-compose run --rm dev-tools black celerywyrm bookwyrm
|
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 npm exec --prefix=dev-tools/ -- prettier \
|
||||||
docker-compose run --rm dev-tools npx stylelint \
|
--write bookwyrm/static/js/*.js
|
||||||
bookwyrm/static/css/bookwyrm.scss bookwyrm/static/css/bookwyrm/**/*.scss --fix \
|
docker-compose run --rm dev-tools npm exec --prefix=dev-tools/ -- stylelint \
|
||||||
--config dev-tools/.stylelintrc.js
|
--fix --config=dev-tools/.stylelintrc.js --ignore-path=dev-tools/.stylelintignore \
|
||||||
|
bookwyrm/static/css
|
||||||
;;
|
;;
|
||||||
compilescss)
|
compilescss)
|
||||||
runweb python manage.py compilescss
|
runweb python manage.py compilescss
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
**/vendor/**
|
**/vendor/**
|
||||||
|
**/fonts/**
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* global module */
|
/* global module */
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
"extends": "stylelint-config-standard",
|
"extends": "stylelint-config-standard-scss",
|
||||||
|
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"stylelint-order"
|
"stylelint-order"
|
||||||
|
|
|
@ -2,13 +2,14 @@ FROM python:3.9
|
||||||
|
|
||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
|
|
||||||
RUN mkdir /app
|
WORKDIR /app/dev-tools
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
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 pip install -r requirements.txt
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y curl
|
RUN apt-get update && apt-get install -y curl
|
||||||
RUN curl -sL https://deb.nodesource.com/setup_17.x | bash -
|
RUN curl -sL https://deb.nodesource.com/setup_17.x | bash -
|
||||||
RUN apt-get install -y nodejs && apt-get clean
|
RUN apt-get install -y nodejs && apt-get clean
|
||||||
RUN npm install .
|
RUN npm install .
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
"stylelint-config-recommended": "^7.0.0",
|
"stylelint-config-recommended": "^7.0.0",
|
||||||
"stylelint-config-standard": "^25.0.0",
|
"stylelint-config-standard": "^25.0.0",
|
||||||
"stylelint-order": "^5.0.0",
|
"stylelint-order": "^5.0.0",
|
||||||
|
"stylelint-config-standard-scss": "^3.0.0",
|
||||||
"watch": "^0.13.0"
|
"watch": "^0.13.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -101,6 +101,7 @@ services:
|
||||||
build: dev-tools
|
build: dev-tools
|
||||||
env_file: .env
|
env_file: .env
|
||||||
volumes:
|
volumes:
|
||||||
|
- /app/dev-tools/
|
||||||
- .:/app
|
- .:/app
|
||||||
volumes:
|
volumes:
|
||||||
pgdata:
|
pgdata:
|
||||||
|
|
Loading…
Reference in a new issue