mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-17 19:52:23 +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:
|
||||
pip install -e ".[dev]"
|
||||
|
||||
|
@ -9,3 +10,11 @@ format:
|
|||
|
||||
lint:
|
||||
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:
|
||||
rm -rf $(BUILDDIR)/*
|
||||
|
||||
.PHONY: install ## to install all documentation related requirements
|
||||
install:
|
||||
pip install -r requirements.txt
|
||||
|
||||
.PHONY: html
|
||||
html:
|
||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||
@echo
|
||||
@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
|
||||
dirhtml:
|
||||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
sphinx
|
||||
Sphinx==1.5.3
|
||||
sphinx-autobuild==0.7.1
|
||||
# Docs template
|
||||
http://graphene-python.org/sphinx_graphene_theme.zip
|
||||
|
|
Loading…
Reference in New Issue
Block a user