Skip to content

Commit

Permalink
make: simplify mkdocs task commands for python virtual environment
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalli-johnny committed Nov 22, 2024
1 parent 93196ec commit e55780a
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# ------------------------------------------
# .PHONY: ensures target used rather than matching file name
# https://makefiletutorial.com/#phony
.PHONY: all clean deps dist lint pre-commit-check repl test test-ci test-watch
.PHONY: all clean deps dist docs lint pre-commit-check repl test test-ci test-watch

# -- Makefile Variables ---------------- #
# run help if no target specified
Expand Down Expand Up @@ -184,21 +184,17 @@ git-status: ## status details of git repos under current directory
# -------------------------------------- #

# --- Documentation Generation -------- #
python-venv: ## Enable Python Virtual Environment for MkDocs
$(info -- Mkdocs Local Server -----------------)
source ~/.local/venv/bin/activate
docs: ## Build and run mkdocs in local server (python venv)
$(info -- MkDocs Local Server -----------------)
. ~/.local/venv/bin/activate; $(MKDOCS_SERVER)

docs: python-venv ## Build and run mkdocs in local server (python venv)
$(info -- Mkdocs Local Server -----------------)
source ~/.local/venv/bin/activate && $(MKDOCS_SERVER)
docs-changed: ## Build only changed files and run mkdocs in local server (python venv)
$(info -- Mkdocs Local Server -----------------)
. ~/.local/venv/bin/activate; $(MKDOCS_SERVER) --dirtyreload

docs-changed: python-venv ## Build only changed files and run mkdocs in local server (python venv)
$(info -- Mkdocs Local Server -----------------)
source ~/.local/venv/bin/activate && $(MKDOCS_SERVER) --dirtyreload

docs-build: python-venv ## Build mkdocs (python venv)
$(info -- Mkdocs Local Server -----------------)
source ~/.local/venv/bin/activate && mkdocs build
docs-build: ## Build mkdocs (python venv)
$(info -- Mkdocs Local Server -----------------)
. ~/.local/venv/bin/activate; mkdocs build
# -------------------------------------- #

# ------- Docker Containers ------------ #
Expand Down

0 comments on commit e55780a

Please sign in to comment.