diff options
author | pacien | 2020-02-14 15:39:56 +0100 |
---|---|---|
committer | Notkea | 2020-02-17 21:07:39 +0100 |
commit | 395a76bc4193c0c7182f87778458a68d0079e836 (patch) | |
tree | 72a4e6fd10ff8053f5a3e7fdbf4f6d63817ac00b /compiler/src/Config.hs | |
parent | c3c69b601d834c8df7cba88a0d3149b56cdd5d14 (diff) | |
download | ldgallery-395a76bc4193c0c7182f87778458a68d0079e836.tar.gz |
compiler: metadata sidecar for whole directories
GitHub: closes #3
Diffstat (limited to 'compiler/src/Config.hs')
-rw-r--r-- | compiler/src/Config.hs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/src/Config.hs b/compiler/src/Config.hs index 4c9aa40..4826f17 100644 --- a/compiler/src/Config.hs +++ b/compiler/src/Config.hs | |||
@@ -33,8 +33,7 @@ import Resource (Resolution(..)) | |||
33 | 33 | ||
34 | 34 | ||
35 | data CompilerConfig = CompilerConfig | 35 | data CompilerConfig = CompilerConfig |
36 | { galleryName :: String | 36 | { includedDirectories :: [String] |
37 | , includedDirectories :: [String] | ||
38 | , excludedDirectories :: [String] | 37 | , excludedDirectories :: [String] |
39 | , includedFiles :: [String] | 38 | , includedFiles :: [String] |
40 | , excludedFiles :: [String] | 39 | , excludedFiles :: [String] |
@@ -45,8 +44,7 @@ data CompilerConfig = CompilerConfig | |||
45 | 44 | ||
46 | instance FromJSON CompilerConfig where | 45 | instance FromJSON CompilerConfig where |
47 | parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig | 46 | parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig |
48 | <$> v .:? "galleryName" .!= "Gallery" | 47 | <$> v .:? "includedDirectories" .!= ["*"] |
49 | <*> v .:? "includedDirectories" .!= ["*"] | ||
50 | <*> v .:? "excludedDirectories" .!= [] | 48 | <*> v .:? "excludedDirectories" .!= [] |
51 | <*> v .:? "includedFiles" .!= ["*"] | 49 | <*> v .:? "includedFiles" .!= ["*"] |
52 | <*> v .:? "excludedFiles" .!= [] | 50 | <*> v .:? "excludedFiles" .!= [] |