@@ -25,15 +25,16 @@ elemBlock path info = writeElemBlock . elemBlockData
2525 writeElemBlock :: ElemBlockData -> IO ()
2626 writeElemBlock (ElemBlockData flatPatterns rulesTree) =
2727 do
28- let debugPath = path </> " debug "
29- filteredInfo = filter ( (||) <$> not . startswith " Url: " <*> startswith " Url: http " ) info
28+ let filteredInfo = filter ( (||) <$> not . startswith " Url: " <*> startswith " Url: http " ) info
29+ -- debugPath = path </> "debug"
3030 createDirectoryIfMissing True path
3131 cont <- getDirectoryContents path
3232 _ <- sequence $ removeOld <$> cont
33- createDirectoryIfMissing True debugPath
33+ -- createDirectoryIfMissing True debugPath
3434 -- writeBlockTree path debugPath rulesTree
3535 writeBlockTree path rulesTree
36- writePatterns_with_debug filteredInfo (path </> " ab2p.common.css" ) (debugPath </> " ab2p.common.css" ) flatPatterns
36+ writePatterns_with_debug filteredInfo (path </> " ab2p.common.css" ) " " flatPatterns
37+ -- writePatterns_with_debug filteredInfo (path </> "ab2p.common.css") (debugPath </> "ab2p.common.css") flatPatterns
3738 removeOld entry' =
3839 let entry = path </> entry'
3940 in do
@@ -64,9 +65,10 @@ elemBlock path info = writeElemBlock . elemBlockData
6465 writePatterns_with_debug _ _ _ [] = return ()
6566 writePatterns_with_debug info' normalFilename debugFilename patterns =
6667 do
67- writeCssFile debugFilename $ intercalate " \n " $ (++ Templates. blockCss) <$> patterns
6868 writeCssFile normalFilename $ intercalate " \n " ((++ Templates. blockCss) . intercalate " ," <$>
69- splitEvery 4000 patterns)
69+ splitEvery 4000 patterns)
70+ when (debugFilename /= " " ) $
71+ writeCssFile debugFilename $ intercalate " \n " $ (++ Templates. blockCss) <$> patterns
7072 where
7173 splitEvery n = takeWhile (not . null ) . unfoldr (Just . splitAt n)
7274 writeCssFile filename content =
0 commit comments