kopia lustrzana https://github.com/wagtail/docker-wagtail-develop
Wagtail repo format and lint make commands (#60)
* Fix docstring * Install make on frontend container * Lint and format commands * Update readmepull/65/head
rodzic
bdb87e6fbe
commit
e90654533d
|
@ -1,7 +1,7 @@
|
||||||
FROM node:18-slim
|
FROM node:18-slim
|
||||||
LABEL maintainer="hello@wagtail.org"
|
LABEL maintainer="hello@wagtail.org"
|
||||||
|
|
||||||
RUN apt-get update && apt-get install rsync -y
|
RUN apt-get update && apt-get install rsync make -y
|
||||||
COPY ./wagtail/package.json ./wagtail/package-lock.json ./
|
COPY ./wagtail/package.json ./wagtail/package-lock.json ./
|
||||||
|
|
||||||
RUN npm --prefix / install --loglevel info
|
RUN npm --prefix / install --loglevel info
|
||||||
|
|
11
Makefile
11
Makefile
|
@ -40,5 +40,14 @@ migrations: ## Make migrations to the wagtail bakery site
|
||||||
migrate: ## Migrate the wagtail bakery site migrations
|
migrate: ## Migrate the wagtail bakery site migrations
|
||||||
docker-compose exec web python manage.py migrate
|
docker-compose exec web python manage.py migrate
|
||||||
|
|
||||||
test: ## Run all wagtail tests or pass in a file with `make test file=wagtail.admin.tests.test_name.py`
|
test: ## Run all wagtail tests or pass in a file with `make test file=wagtail.admin.tests.test_name`
|
||||||
docker-compose exec -w /code/wagtail web python runtests.py $(file) $(FILE)
|
docker-compose exec -w /code/wagtail web python runtests.py $(file) $(FILE)
|
||||||
|
|
||||||
|
format-wagtail: ## Format Wagtail repo
|
||||||
|
docker-compose exec -w /code/wagtail web make format-server
|
||||||
|
docker-compose exec frontend make format-client
|
||||||
|
|
||||||
|
lint-wagtail: ## Lint the Wagtail repo (server, client, docs)
|
||||||
|
docker-compose exec -w /code/wagtail web make lint-server
|
||||||
|
docker-compose exec -w /code/wagtail web make lint-docs
|
||||||
|
docker-compose exec frontend make lint-client
|
||||||
|
|
25
README.md
25
README.md
|
@ -154,7 +154,30 @@ make test file=wagtail.admin.tests.test_name.py
|
||||||
or
|
or
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker-compose exec -w /code/wagtail web python runtests.py wagtail.admin.tests.{test_file_name_here}.py
|
docker-compose exec -w /code/wagtail web python runtests.py wagtail.admin.tests.{test_file_name_here}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Format Wagtail codebase
|
||||||
|
|
||||||
|
```sh
|
||||||
|
make format-wagtail
|
||||||
|
```
|
||||||
|
or
|
||||||
|
```sh
|
||||||
|
docker-compose exec -w /code/wagtail web make format-server
|
||||||
|
docker-compose exec frontend make format-client
|
||||||
|
```
|
||||||
|
|
||||||
|
### Lint Wagtail codebase
|
||||||
|
|
||||||
|
```sh
|
||||||
|
make lint-wagtail
|
||||||
|
```
|
||||||
|
or
|
||||||
|
```sh
|
||||||
|
docker-compose exec -w /code/wagtail web make lint-server
|
||||||
|
docker-compose exec -w /code/wagtail web make lint-docs
|
||||||
|
docker-compose exec frontend make lint-client
|
||||||
```
|
```
|
||||||
|
|
||||||
### Open a Django shell session
|
### Open a Django shell session
|
||||||
|
|
Ładowanie…
Reference in New Issue