expose livehtml autobuild in Makefile

This commit is contained in:
Dave A 2019-05-21 23:15:48 -04:00
parent 40229b8a73
commit 738461498f
3 changed files with 12 additions and 6 deletions

View File

@ -5,7 +5,8 @@ help:
.PHONY: docs ## Generate docs .PHONY: docs ## Generate docs
docs: docs:
@cd docs &&\ cd docs && make install && make html
pip install -r requirements.txt &&\
make html &&\ .PHONY: docs-live ## Generate docs with live reloading
cd - docs-live:
cd docs && make install && make livehtml

View File

@ -19,7 +19,11 @@ help:
@echo "Please use \`make <target>' where <target> is one of" @echo "Please use \`make <target>' where <target> 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}' @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: clean:
rm -rf $(BUILDDIR)/* rm -rf $(BUILDDIR)/*
@ -199,6 +203,6 @@ dummy:
@echo @echo
@echo "Build finished. Dummy builder generates no files." @echo "Build finished. Dummy builder generates no files."
.PHONY: livehtml .PHONY: livehtml ## to build and serve live-reloading documentation
livehtml: livehtml:
sphinx-autobuild -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html sphinx-autobuild -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html

View File

@ -1,4 +1,5 @@
# Required library # Required library
Sphinx==1.5.3 Sphinx==1.5.3
sphinx-autobuild
# Docs template # Docs template
http://graphene-python.org/sphinx_graphene_theme.zip http://graphene-python.org/sphinx_graphene_theme.zip