From 1bc393cdc26bbaa9b2927cb4614784d185a7bb27 Mon Sep 17 00:00:00 2001 From: "bozo.kopic" Date: Thu, 17 Aug 2017 15:17:40 +0200 Subject: backend --- dodo.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'dodo.py') diff --git a/dodo.py b/dodo.py index fb63007..94266d3 100644 --- a/dodo.py +++ b/dodo.py @@ -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'])]} -- cgit v1.2.3-70-g09d2