aboutsummaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/app/Main.hs10
-rw-r--r--compiler/readme.md10
2 files changed, 13 insertions, 7 deletions
diff --git a/compiler/app/Main.hs b/compiler/app/Main.hs
index 24d8aad..319e984 100644
--- a/compiler/app/Main.hs
+++ b/compiler/app/Main.hs
@@ -41,29 +41,29 @@ data Options = Options
41options = Options 41options = Options
42 { inputDir = "./" 42 { inputDir = "./"
43 &= typDir 43 &= typDir
44 &= explicit
45 &= name "i" 44 &= name "i"
46 &= name "input-dir" 45 &= name "input-dir"
46 &= explicit
47 &= help "Gallery source directory (default=./)" 47 &= help "Gallery source directory (default=./)"
48 , outputDir = "./out" 48 , outputDir = "./out"
49 &= typDir 49 &= typDir
50 &= explicit
51 &= name "o" 50 &= name "o"
52 &= name "output-dir" 51 &= name "output-dir"
52 &= explicit
53 &= help "Generated gallery output path (default=./out)" 53 &= help "Generated gallery output path (default=./out)"
54 , rebuilAll = False 54 , rebuilAll = False
55 &= explicit
56 &= name "r" 55 &= name "r"
57 &= name "rebuild-all" 56 &= name "rebuild-all"
57 &= explicit
58 &= help "Invalidate cache and recompile everything" 58 &= help "Invalidate cache and recompile everything"
59 , withViewer = False 59 , withViewer = False
60 &= explicit
61 &= name "w" 60 &= name "w"
62 &= name "with-viewer" 61 &= name "with-viewer"
62 &= explicit
63 &= help "Include the static web viewer in the output" 63 &= help "Include the static web viewer in the output"
64 } 64 }
65 65
66 &= summary ("ldgallery v" ++ (showVersion version) ++ " - a static gallery generator with tags") 66 &= summary ("ldgallery v" ++ (showVersion version) ++ " - a static web gallery generator with tags")
67 &= program "ldgallery" 67 &= program "ldgallery"
68 &= help "Compile a gallery" 68 &= help "Compile a gallery"
69 &= helpArg [explicit, name "h", name "help"] 69 &= helpArg [explicit, name "h", name "help"]
diff --git a/compiler/readme.md b/compiler/readme.md
index 5ffe924..e18b026 100644
--- a/compiler/readme.md
+++ b/compiler/readme.md
@@ -1,8 +1,9 @@
1# ldgallery-compiler 1# ldgallery-compiler
2 2
3
3## Build 4## Build
4 5
5Building this project requires the [stack] tool. 6Building the _ldgallery compiler_ requires the [stack] tool.
6 7
7[stack]: https://haskellstack.org/ 8[stack]: https://haskellstack.org/
8 9
@@ -10,5 +11,10 @@ Within the project's directory, use
10 11
11* `stack setup` to setup the development environment and compiler. 12* `stack setup` to setup the development environment and compiler.
12* `stack build` to compile the project. 13* `stack build` to compile the project.
13* or `stack build --fast --file-watch --pedantic` to automatically compile on file change. 14* or `stack build --fast --file-watch` to automatically compile on file change.
14* `stack exec ldgallery-compiler-exe -- --help` to run the compiled program (and displaying its help text for instance). 15* `stack exec ldgallery-compiler-exe -- --help` to run the compiled program (and displaying its help text for instance).
16
17
18### Embedded viewer
19
20In order to allow the `ldgallery` command line tool to generate a full gallery which includes the _viewer_, a compiled version of the web app must be placed under `./data/viewer`. The `--with-viewer` flag will otherwise not be functional.