-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
41 lines (33 loc) · 1.11 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
set windows-shell := ["pwsh", "-NoLogo", "-Command"]
set dotenv-load := true
python := env_var_or_default('PYTHON', 'python')
pip := python + " -m pip"
mkdocs := python + " -m mkdocs"
# List available recipes
@default:
just --list
# Install/upgrade MkDocs, its plugins, and markdown extensions
bootstrap:
{{ pip }} install mkdocs-material --upgrade
{{ pip }} install mdx_truly_sane_lists mkdocs-rss-plugin mkdocs-redirects --upgrade
{{ pip }} install jieba --upgrade # 搜索中文
dot -V # Graphviz / dot is also needed for hooks/relationship.py. https://www.graphviz.org/download/
{{ pip }} install graphviz --upgrade
# Start the live-reloading docs server
serve *ARGS:
{{ mkdocs }} serve {{ ARGS }}
# Build the docs site
build:
{{ mkdocs }} build
# Run pre-commit
check *ARGS:
pre-commit run {{ ARGS }}
# Normalize markdown files
[no-cd]
normalize +FILES:
{{ python }} '{{ justfile_directory() }}/scripts/normalize.py' {{ FILES }}
# Normalize all markdown files in current directory
[no-cd]
[windows]
normalize-all:
just normalize (ls *.md -Name | Join-String -Separator ' ')