diff options
Diffstat (limited to 'compiler/src/Compiler.hs')
-rw-r--r-- | compiler/src/Compiler.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/src/Compiler.hs b/compiler/src/Compiler.hs index bb0ee97..73ac8a4 100644 --- a/compiler/src/Compiler.hs +++ b/compiler/src/Compiler.hs | |||
@@ -70,7 +70,7 @@ writeJSON outputPath object = | |||
70 | ensureParentDir JSON.encodeFile outputPath object | 70 | ensureParentDir JSON.encodeFile outputPath object |
71 | 71 | ||
72 | 72 | ||
73 | galleryDirFilter :: CompilerConfig -> [FilePath] -> FSNode -> Bool | 73 | galleryDirFilter :: GalleryConfig -> [FilePath] -> FSNode -> Bool |
74 | galleryDirFilter config excludedCanonicalDirs = | 74 | galleryDirFilter config excludedCanonicalDirs = |
75 | (not . isHidden) | 75 | (not . isHidden) |
76 | &&& (not . isExcludedDir) | 76 | &&& (not . isExcludedDir) |
@@ -102,8 +102,7 @@ galleryDirFilter config excludedCanonicalDirs = | |||
102 | compileGallery :: FilePath -> FilePath -> FilePath -> [FilePath] -> Bool -> Bool -> IO () | 102 | compileGallery :: FilePath -> FilePath -> FilePath -> [FilePath] -> Bool -> Bool -> IO () |
103 | compileGallery configPath inputDirPath outputDirPath excludedDirs rebuildAll cleanOutput = | 103 | compileGallery configPath inputDirPath outputDirPath excludedDirs rebuildAll cleanOutput = |
104 | do | 104 | do |
105 | fullConfig <- readConfig $ inputGalleryConf configPath | 105 | config <- readConfig $ inputGalleryConf configPath |
106 | let config = compiler fullConfig | ||
107 | 106 | ||
108 | inputDir <- readDirectory inputDirPath | 107 | inputDir <- readDirectory inputDirPath |
109 | excludedCanonicalDirs <- mapM canonicalizePath excludedDirs | 108 | excludedCanonicalDirs <- mapM canonicalizePath excludedDirs |
@@ -119,7 +118,7 @@ compileGallery configPath inputDirPath outputDirPath excludedDirs rebuildAll cle | |||
119 | 118 | ||
120 | when cleanOutput $ galleryCleanupResourceDir resources outputDirPath | 119 | when cleanOutput $ galleryCleanupResourceDir resources outputDirPath |
121 | writeJSON outputIndex resources | 120 | writeJSON outputIndex resources |
122 | writeJSON outputViewerConf $ viewer fullConfig | 121 | writeJSON outputViewerConf $ viewerConfig config |
123 | 122 | ||
124 | where | 123 | where |
125 | inputGalleryConf :: FilePath -> FilePath | 124 | inputGalleryConf :: FilePath -> FilePath |