-
Notifications
You must be signed in to change notification settings - Fork 5
/
justfile
45 lines (34 loc) · 1.35 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
#!/usr/bin/env just --justfile
set dotenv-load := true
sample_toml := "tests/url_shortener.toml"
sample_md := "dist/url_shortener.md"
sample_png := "dist/url_shortener.png"
built_wheel := "./dist/skillmap-*-py3-none-any.whl"
# build and install package into system python for every python file change
dev:
find skillmap -iname "*.py" -iname "pyproject.toml" | entr -s "poetry build && pip install {{ built_wheel }} --force-reinstall"
# install package into system python
setup:
# install the library into system python
rm -fr ./dist
poetry build && pip install {{ built_wheel }} --force-reinstall
# publish package to pypi
publish:
poetry build
poetry publish
# generate markdown from source toml file
generate src dest:
echo '```mermaid' > {{ dest }} && poetry run skillmap {{ src }} >> {{ dest }} && echo '```' >> {{ dest }}
# generate png from source toml file
png src dest:
# mermaid cli (https://github.com/mermaid-js/mermaid-cli) needs to be installed
poetry run skillmap {{ src }} | mmdc -o {{ dest }}
# generate markdown for sample skillmap
generate_sample:
just generate {{ sample_toml }} {{ sample_md }}
# generate png for sample skillmap
png_sample:
just png {{ sample_toml }} {{ sample_png }}
# develop sample skillmap by hot reloading the file and generated results
dev_sample:
find "tests" -iname "*.toml" | entr -s "just generate_sample"