2
1
Fork 0
quickshell-docs/Justfile

33 lines
1.4 KiB
Makefile
Raw Normal View History

2024-03-09 14:26:27 +00:00
typegen_bin := env_var_or_default('TYPEGEN', './typegen/target/debug/typegen')
src_path := env_var_or_default('SRC_PATH', '../src')
build_typegen := if typegen_bin == './typegen/target/debug/typegen' { "true" } else { "false" }
2024-02-12 12:07:01 +00:00
clean:
2024-03-09 14:26:27 +00:00
rm -rf public
2024-02-12 12:07:01 +00:00
rm -rf build
2024-02-26 08:57:10 +00:00
rm -rf data/modules/Quickshell
rm -rf content/docs/types/Quickshell
2024-03-03 09:58:33 +00:00
rm -rf data/modules/Quickshell.Io
rm -rf content/docs/types/Quickshell.Io
2024-02-26 08:57:10 +00:00
rm -rf data/modules/Quickshell.Wayland
rm -rf content/docs/types/Quickshell.Wayland
2024-02-12 12:07:01 +00:00
2024-03-09 14:26:27 +00:00
buildtypegen:
({{build_typegen}} && cd typegen && cargo build) || true
typedocs: clean buildtypegen
2024-02-12 12:07:01 +00:00
mkdir -p build/types/types
2024-03-09 14:26:27 +00:00
{{typegen_bin}} gentypes {{src_path}}/core/module.md build/types/types/Quickshell.json
{{typegen_bin}} gentypes {{src_path}}/io/module.md build/types/types/Quickshell.Io.json
{{typegen_bin}} gentypes {{src_path}}/wayland/module.md build/types/types/Quickshell.Wayland.json
sh -c '{{typegen_bin}} gendocs {{src_path}}/core/module.md data/modules/Quickshell content/docs/types/Quickshell types/* build/types/types/*'
sh -c '{{typegen_bin}} gendocs {{src_path}}/io/module.md data/modules/Quickshell.Io content/docs/types/Quickshell.Io types/* build/types/types/*'
sh -c '{{typegen_bin}} gendocs {{src_path}}/wayland/module.md data/modules/Quickshell.Wayland content/docs/types/Quickshell.Wayland types/* build/types/types/*'
2024-02-12 12:07:01 +00:00
serve: typedocs
hugo server --buildDrafts --disableFastRender
2024-03-09 14:26:27 +00:00
build: typedocs
hugo