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
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

View File

@ -19,7 +19,11 @@ help:
@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}'
.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

View File

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