Last active
July 18, 2017 06:28
-
-
Save jaantollander/0c6bf0758706518a865aa99c98006cfa to your computer and use it in GitHub Desktop.
Livereload Sphinx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from livereload import Server, shell | |
package = "<package name>" | |
server = Server() | |
server.watch('docs/*.rst', shell('make html', cwd='docs')) | |
server.watch('docs/**/*.rst', shell('make html', cwd='docs')) | |
server.watch(f'{package}/**/*.py', shell('make html', cwd='docs')) | |
server.watch(f'{package}/*.py', shell('make html', cwd='docs')) | |
server.serve(root='docs/_build/html') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment