aboutsummaryrefslogtreecommitdiff
path: root/compiler/app
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/app')
-rw-r--r--compiler/app/Main.hs12
1 files changed, 10 insertions, 2 deletions
diff --git a/compiler/app/Main.hs b/compiler/app/Main.hs
index 753f281..1229e88 100644
--- a/compiler/app/Main.hs
+++ b/compiler/app/Main.hs
@@ -37,8 +37,9 @@ data ViewerConfig = ViewerConfig
37 37
38 38
39data Options = Options 39data Options = Options
40 { inputDir :: String 40 { inputDir :: FilePath
41 , outputDir :: String 41 , outputDir :: FilePath
42 , galleryConfig :: FilePath
42 , rebuilAll :: Bool 43 , rebuilAll :: Bool
43 , cleanOutput :: Bool 44 , cleanOutput :: Bool
44 , withViewer :: Bool 45 , withViewer :: Bool
@@ -58,6 +59,12 @@ options = Options
58 &= name "output-dir" 59 &= name "output-dir"
59 &= explicit 60 &= explicit
60 &= help "Generated gallery output path (default=./out)" 61 &= help "Generated gallery output path (default=./out)"
62 , galleryConfig = ""
63 &= typFile
64 &= name "g"
65 &= name "gallery-config"
66 &= explicit
67 &= help "Gallery configuration file (default=$input-dir/gallery.yaml)"
61 , rebuilAll = False 68 , rebuilAll = False
62 &= name "r" 69 &= name "r"
63 &= name "rebuild-all" 70 &= name "rebuild-all"
@@ -99,6 +106,7 @@ main =
99 buildGallery opts = 106 buildGallery opts =
100 checkDistinctPaths (inputDir opts) (outputDir opts) 107 checkDistinctPaths (inputDir opts) (outputDir opts)
101 >> compileGallery 108 >> compileGallery
109 (galleryConfig opts)
102 (inputDir opts) 110 (inputDir opts)
103 (galleryOutputDir opts) 111 (galleryOutputDir opts)
104 [outputDir opts] 112 [outputDir opts]