-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
44 lines (31 loc) · 906 Bytes
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
set dotenv-load := true
python := "./venv/bin/python"
pip := "./venv/bin/python -m pip"
ruff := "./venv/bin/ruff"
flake8 := "./venv/bin/flake8"
clean:
rm -rf venv
rm -rf backend/build
rm -rf backend/static/campusign_server.egg-info
venv:
[ -d venv ] || (python3 -m venv --without-pip venv/ && curl https://bootstrap.pypa.io/get-pip.py | {{ python }})
setup: venv
npm install
{{ pip }} install -e ./backend[test]
alias fmt := format
test: test-backend test-frontend
test-backend:
./venv/bin/pytest -W ignore::DeprecationWarning
test-frontend:
cd frontend && npx mocha --require test/setup_dom.mjs
format:
dprint fmt
lint: lint-backend lint-frontend
lint-backend:
{{ flake8 }} backend
lint-frontend:
npx stylelint "frontend/**/*.css"
npx standard
npx html-validate "frontend/**/*.j2"
server:
./venv/bin/flask --app server.main run --debug