on master help sign in
Make code to build reactor a bit nicer
commit919ffa9f4d7cb5ecce8c2d311b4750fc87ff9dcc authorEvan Czaplicki <evancz@users.noreply.github.com> dateTue 3 Apr 2018, 14:31 (9 years ago) parent72911f0
1 file changed+9−13
ui/terminal/src/Develop/StaticFiles/Build.hs+9−13
ui/terminal/src/Develop/StaticFiles/Build.hs+9−13
@@ -35,19 +35,15 @@ readAsset path =
3535compile :: IO BS.ByteString
3636compile =
3737 if True then return "TODO" else
38− do Dir.setCurrentDirectory "ui"
39−
40− reporter <- Terminal.create
41− void $ Task.run reporter $
42− do summary <- Project.getRoot
43− Project.compile options Nothing summary rootPaths
44−
45− result <- BS.readFile tempFileName
46− seq (BS.length result) (Dir.removeFile tempFileName)
47−
48− Dir.setCurrentDirectory ".."
49−
50− return result
38+ Dir.withCurrentDirectory ("ui" </> "browser") $
39+ do reporter <- Terminal.create
40+ void $ Task.run reporter $
41+ do summary <- Project.getRoot
42+ Project.compile options Nothing summary rootPaths
43+
44+ result <- BS.readFile tempFileName
45+ seq (BS.length result) (Dir.removeFile tempFileName)
46+ return result
5147
5248
5349options :: Output.Options