From 738461498fff589c2ab94303a82d9eebb890fc57 Mon Sep 17 00:00:00 2001 From: Dave A Date: Tue, 21 May 2019 23:15:48 -0400 Subject: [PATCH] expose livehtml autobuild in Makefile --- Makefile | 9 +++++---- docs/Makefile | 8 ++++++-- docs/requirements.txt | 1 + 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index c1a00054..a905f831 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,8 @@ help: .PHONY: docs ## Generate docs docs: - @cd docs &&\ - pip install -r requirements.txt &&\ - make html &&\ - cd - + cd docs && make install && make html + +.PHONY: docs-live ## Generate docs with live reloading +docs-live: + cd docs && make install && make livehtml diff --git a/docs/Makefile b/docs/Makefile index 3eb7e638..fbc76577 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -19,7 +19,11 @@ help: @echo "Please use \`make ' where is one of" @grep -E '^\.PHONY: [a-zA-Z_-]+ .*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = "(: |##)"}; {printf "\033[36m%-30s\033[0m %s\n", $$2, $$3}' -.PHONY: clean +.PHONY: install ## to install all documentation related requirements +install: + pip install -r requirements.txt + +.PHONY: clean ## to remove all built documentation clean: rm -rf $(BUILDDIR)/* @@ -199,6 +203,6 @@ dummy: @echo @echo "Build finished. Dummy builder generates no files." -.PHONY: livehtml +.PHONY: livehtml ## to build and serve live-reloading documentation livehtml: sphinx-autobuild -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html diff --git a/docs/requirements.txt b/docs/requirements.txt index b6e0cd75..e63ca591 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,5 @@ # Required library Sphinx==1.5.3 +sphinx-autobuild # Docs template http://graphene-python.org/sphinx_graphene_theme.zip