From 74e4a83ac7511086f45d2fa9880b7ae5728020bd Mon Sep 17 00:00:00 2001 From: pacien Date: Tue, 25 Feb 2020 20:19:54 +0100 Subject: compiler: add cli arg for output gallery index GitHub: closes #143 --- compiler/app/Main.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'compiler/app') diff --git a/compiler/app/Main.hs b/compiler/app/Main.hs index 404de4b..a4b6ae2 100644 --- a/compiler/app/Main.hs +++ b/compiler/app/Main.hs @@ -39,6 +39,7 @@ data ViewerConfig = ViewerConfig data Options = Options { inputDir :: FilePath , outputDir :: FilePath + , outputIndex :: FilePath , galleryConfig :: FilePath , rebuilAll :: Bool , cleanOutput :: Bool @@ -59,6 +60,12 @@ options = Options &= name "output-dir" &= explicit &= help "Generated gallery output path (default=./out)" + , outputIndex = "" + &= typFile + &= name "x" + &= name "output-index" + &= explicit + &= help "Generated gallery index output path (default=$output-dir/index.json)" , galleryConfig = "" &= typFile &= name "g" @@ -110,6 +117,7 @@ main = (galleryConfig opts) (inputDir opts) (galleryOutputDir opts) + (outputIndex opts) [outputDir opts] (rebuilAll opts) (cleanOutput opts) -- cgit v1.2.3