diff options
| author | bozo.kopic <bozo.kopic@gmail.com> | 2017-08-17 15:17:40 +0200 |
|---|---|---|
| committer | bozo.kopic <bozo.kopic@gmail.com> | 2017-08-17 15:17:40 +0200 |
| commit | 1bc393cdc26bbaa9b2927cb4614784d185a7bb27 (patch) | |
| tree | ea9ab04949012c46eb9d926d9764dd98022a3592 /dodo.py | |
| parent | 074b604076049fb809c22ec0afaf18f5b55cc3ca (diff) | |
backend
Diffstat (limited to 'dodo.py')
| -rw-r--r-- | dodo.py | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -52,6 +52,7 @@ def task_clean_all(): return {'actions': [(rm_rf, ['build', 'dist'])], 'task_dep': ['pyhatter_clean', 'jshatter_clean', + 'docs_clean', 'dist_clean']} @@ -270,3 +271,23 @@ def task_jshatter_watch(): return {'actions': ['yarn run watch'], 'task_dep': ['jshatter_install_deps', 'jshatter_gen']} + + +# ############################ docs tasks ##################################### + +def task_docs_clean(): + """Docs - clean""" + + return {'actions': [(rm_rf, ['build/docs'])]} + + +def task_docs_build(): + """Docs - build documentation""" + + def build_html(src, dest): + mkdir_p(Path(dest).parent) + subprocess.Popen([ + 'sphinx-build', '-q', '-b', 'html', + str(Path(src)), str(Path(dest))]).wait() + + return {'actions': [(build_html, ['docs', 'build/docs'])]} |
