-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
84 lines (68 loc) · 1.91 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
alias s := serve
# List everything
default:
@just --list
# Serve the site localling
serve:
@echo "Serving the site locally"
@echo "If this fails you might need either to install mkdocs-material or run 'just serve-docker' instead"
mkdocs serve
# Serve the site locally using Docker
serve-docker:
@echo "Serving the site locally using Docker"
docker run --rm -u "$(id -u):$(id -g)" -v "$PWD":/docs -p 8000:8000 squidfunk/mkdocs-material
# Serve the site locally using Poetry
serve-poetry: poetry-install
@echo "Serving the site locally using Poetry"
poetry run mkdocs serve
# Make everything ready for a PR
pr:
@just format-check
@just lint-check
@just spell-check
@echo "PR checks complete!"
# Check for spelling errors
spell-check:
@echo "Checking for spelling errors"
pnpm spell:check
# Add a word to the dictionary
spell-add *WORDS:
@echo "Adding {{ WORDS }} to the dictionary"
for word in {{ WORDS }}; do echo $word >> project-words.txt; done
@just spell-sort
# Sort the dictionary
spell-sort:
@echo "Sorting the dictionary"
sort -o project-words.txt project-words.txt
# Check for formatting errors
format-check:
@echo "Checking for formatting errors"
pnpm format:check
# Fix formatting errors
format-fix:
@echo "Fixing formatting errors"
pnpm format:fix
# Check for lint errors
lint-check:
@echo "Checking for lint errors"
pnpm lint:check
# Fix lint errors
lint-fix:
@echo "Fixing lint errors"
pnpm lint:fix
# Install pnpm
pnpm-install:
@echo "Installing pnpm"
wget -qO- https://get.pnpm.io/install.sh | sh
# Install NPM dependencies
npm-install:
@echo "Installing NPM dependencies"
pnpm install
# Clean the NPM cache
npm-clean:
@echo "Cleaning NPM cache"
rm -rf node_modules/ .pnpm-store/
# Install Poetry dependencies
poetry-install:
@echo "Installing Poetry dependencies"
poetry install --no-root