diff options
Diffstat (limited to 'cli.py')
| -rwxr-xr-x | cli.py | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -11,6 +11,8 @@ import os import yaml import logging import logging.config +from livereload import Server, shell + here = os.path.dirname(__file__) @@ -166,10 +168,19 @@ def uninstall(): @cli.command() def upload(): dist = Path('dist') - dist.rmdir_p() + if dist.exists(): + dist.rmdir_p() + dist.makedirs_p() sh('python3 setup.py bdist_wheel') sh('twine upload dist/*') +@cli.command() +def docs_serve(): + server = Server() + server.watch('docs/*.rst', shell('make html', cwd='docs')) + server.serve(root='docs/_build/html', open_url=True) + + if __name__ == '__main__': cli() |
