website/justfile

56 lines
1011 B
Makefile
Raw Normal View History

2022-06-09 22:20:40 +01:00
set dotenv-load
DEV_COMPOSE := justfile_directory() + "/docker/dev/docker-compose.yml"
2022-06-09 22:20:40 +01:00
# Recipes
@default:
just --list
build:
docker-compose -f {{ DEV_COMPOSE }} pull
docker-compose -f {{ DEV_COMPOSE }} build
docker-compose -f {{ DEV_COMPOSE }} run --rm --no-deps web npm ci
@compose +ARGS:
docker-compose -f {{ DEV_COMPOSE }} {{ ARGS }}
2022-06-09 22:20:40 +01:00
@start:
honcho start
@manage +ARGS:
./manage.py {{ ARGS }}
2022-06-12 15:17:28 +01:00
@pip +ARGS:
pip {{ ARGS }}
2022-06-10 16:22:20 +01:00
test *ARGS:
./manage.py test {{ ARGS }}
2022-06-12 15:17:28 +01:00
2022-08-17 19:09:07 +01:00
coverage:
coverage run ./manage.py test --keepdb
coverage report
coverage html
2022-06-12 15:17:28 +01:00
format:
black .
isort .
find website/ -name '*.html' | xargs djhtml -i --tabwidth 2
2022-06-12 19:35:06 +01:00
npm run format
2022-06-12 15:17:28 +01:00
2022-06-12 19:35:06 +01:00
lint: lint_python lint_node
lint_python:
black --check .
isort --check .
flake8
mypy . --show-error-codes
2022-08-03 20:22:02 +01:00
curlylint .
find website/ -name '*.html' | xargs djhtml --check --tabwidth 2
2022-06-12 19:35:06 +01:00
@lint_node:
npm run lint
2022-07-29 09:02:09 +01:00
@sh:
docker-compose -f {{ DEV_COMPOSE }} up -d
2022-07-29 09:02:09 +01:00
docker-compose -f {{ DEV_COMPOSE }} exec web bash