mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-18 20:22:21 +03:00
Expose doc commands in root makefile and add autobuild
This commit is contained in:
parent
775d2e3523
commit
81cef14353
9
Makefile
9
Makefile
|
@ -1,3 +1,4 @@
|
||||||
|
.PHONY: dev-setup ## Install development dependencies
|
||||||
dev-setup:
|
dev-setup:
|
||||||
pip install -e ".[dev]"
|
pip install -e ".[dev]"
|
||||||
|
|
||||||
|
@ -9,3 +10,11 @@ format:
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
flake8 graphene_django examples
|
flake8 graphene_django examples
|
||||||
|
|
||||||
|
.PHONY: docs ## Generate docs
|
||||||
|
docs: dev-setup
|
||||||
|
cd docs && make install && make html
|
||||||
|
|
||||||
|
.PHONY: docs-live ## Generate docs with live reloading
|
||||||
|
docs-live: dev-setup
|
||||||
|
cd docs && make install && make livehtml
|
||||||
|
|
|
@ -48,12 +48,20 @@ help:
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(BUILDDIR)/*
|
rm -rf $(BUILDDIR)/*
|
||||||
|
|
||||||
|
.PHONY: install ## to install all documentation related requirements
|
||||||
|
install:
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
.PHONY: html
|
.PHONY: html
|
||||||
html:
|
html:
|
||||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||||
@echo
|
@echo
|
||||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||||
|
|
||||||
|
.PHONY: livehtml ## to build and serve live-reloading documentation
|
||||||
|
livehtml:
|
||||||
|
sphinx-autobuild -b html --watch ../graphene_django $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||||
|
|
||||||
.PHONY: dirhtml
|
.PHONY: dirhtml
|
||||||
dirhtml:
|
dirhtml:
|
||||||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
sphinx
|
Sphinx==1.5.3
|
||||||
|
sphinx-autobuild==0.7.1
|
||||||
# Docs template
|
# Docs template
|
||||||
http://graphene-python.org/sphinx_graphene_theme.zip
|
http://graphene-python.org/sphinx_graphene_theme.zip
|
||||||
|
|
Loading…
Reference in New Issue
Block a user