-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (47 loc) · 1.46 KB
/
Makefile
File metadata and controls
61 lines (47 loc) · 1.46 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.DEFAULT_GOAL = help
THEME_DIR = src/sphinx_artisan_theme/themes/artisan
bootstrap:
yarn install
poetry install
#: build the projects output files
build: update
npx tailwindcss \
-c ${THEME_DIR}/tailwind.config.js \
-i ${THEME_DIR}/static/theme.src.css \
-o ${THEME_DIR}/static/theme.css --minify
poetry build
#: run continuous integration tasks
ci:
poetry run pylint sphinx_artisan_theme tests
poetry run mypy src tests
poetry run pytest tests
poetry run sphinx-build -M linkcheck src dist
clean:
rm -rf dist
#: open a repl console
console:
poetry run python
docs: update
poetry run sphinx-build -b dirhtml -a -n docs dist/docs
#: format all source files
format:
poetry run shed --refactor --py39-plus src/**/*.py tests/*.py
#: list avalible make targets
help:
@grep -B1 -E "^[a-zA-Z0-9_-]+\:([^\=]|$$)" Makefile \
| grep -v -- -- \
| sed 'N;s/\n/###/' \
| sed -n 's/^#: \(.*\)###\(.*\):.*/make \2### \1/p' \
| column -t -s '###' \
| sort
#: run project server locally
server: update
poetry run sphinx-autobuild -b dirhtml docs dist/docs --host 0.0.0.0 --watch ./src
#: setup the project after a `git clone`
setup: bootstrap
#: run the projects test suite
test:
poetry run pytest -vvv --mypy --pylint --pydocstyle --cov --cov-report term-missing --typeguard-packages=sphinx_artisan_theme,tests src tests
#: update the project after a `git pull`
update: bootstrap
.PHONY: bootstrap build ci clean console format help server setup test update