From ce0b7ec230703d239b3d77e09352c0b1d515d8f5 Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 21 Feb 2020 15:39:01 +0100 Subject: compiler: add gallery config file CLI argument GitHub: closes #136 --- compiler/app/Main.hs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'compiler/app') 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 data Options = Options - { inputDir :: String - , outputDir :: String + { inputDir :: FilePath + , outputDir :: FilePath + , galleryConfig :: FilePath , rebuilAll :: Bool , cleanOutput :: Bool , withViewer :: Bool @@ -58,6 +59,12 @@ options = Options &= name "output-dir" &= explicit &= help "Generated gallery output path (default=./out)" + , galleryConfig = "" + &= typFile + &= name "g" + &= name "gallery-config" + &= explicit + &= help "Gallery configuration file (default=$input-dir/gallery.yaml)" , rebuilAll = False &= name "r" &= name "rebuild-all" @@ -99,6 +106,7 @@ main = buildGallery opts = checkDistinctPaths (inputDir opts) (outputDir opts) >> compileGallery + (galleryConfig opts) (inputDir opts) (galleryOutputDir opts) [outputDir opts] -- cgit v1.2.3