From fa1db45a11f6a6c5f0c1b779babfbe168bbdb87c Mon Sep 17 00:00:00 2001 From: Steve Johnson Date: Sun, 6 Oct 2013 17:06:00 -0700 Subject: [PATCH] Add livereload to docs --- docs/Guardfile | 9 +++++++++ docs/Makefile | 3 +++ docs/requirements.txt | 4 ++++ 3 files changed, 16 insertions(+) create mode 100644 docs/Guardfile diff --git a/docs/Guardfile b/docs/Guardfile new file mode 100644 index 000000000..2bbb2ef91 --- /dev/null +++ b/docs/Guardfile @@ -0,0 +1,9 @@ +#!/usr/bin/env python +from livereload.task import Task +from livereload.compiler import shell + +Task.add('*.rst', shell('make html')) +Task.add('*/*.rst', shell('make html')) +Task.add('_static/*.css', shell('make clean html')) +Task.add('Makefile', shell('make html')) +Task.add('conf.py', shell('make html')) diff --git a/docs/Makefile b/docs/Makefile index 6fd3002d5..f28f802a1 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -151,3 +151,6 @@ doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." + +livehtml: html + livereload $(BUILDDIR)/html -p 33233 diff --git a/docs/requirements.txt b/docs/requirements.txt index da41ab3ff..2359d711e 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -10,3 +10,7 @@ Sphinx==1.1.3 docopt==0.6.1 docutils==0.11 wsgiref==0.1.2 + +# livereload not strictly necessary but really useful (make livehtml) +tornado==3.1.1 +livereload==1.0.1