aboutsummaryrefslogtreecommitdiff
path: root/dodo.py
diff options
context:
space:
mode:
authorbozo.kopic <bozo.kopic@gmail.com>2017-08-17 15:17:40 +0200
committerbozo.kopic <bozo.kopic@gmail.com>2017-08-17 15:17:40 +0200
commit1bc393cdc26bbaa9b2927cb4614784d185a7bb27 (patch)
treeea9ab04949012c46eb9d926d9764dd98022a3592 /dodo.py
parent074b604076049fb809c22ec0afaf18f5b55cc3ca (diff)
backend
Diffstat (limited to 'dodo.py')
-rw-r--r--dodo.py21
1 files changed, 21 insertions, 0 deletions
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'])]}