1{-# LANGUAGE OverloadedStrings #-}
2module Develop.StaticFiles.Build
9import qualified Data.ByteString as BS
10import qualified System.Directory as Dir
11import System.FilePath ((</>))
13import qualified Elm.Project as Project
14import qualified Generate.Output as Output
15import qualified Reporting.Task as Task
16import qualified Reporting.Progress.Terminal as Terminal
23readAsset :: FilePath -> IO BS.ByteString
25 BS.readFile ("reactor" </> "assets" </> path)
32compile :: IO BS.ByteString
34 Dir.withCurrentDirectory "reactor" $
35 do reporter <- Terminal.create
37 do summary <- Project.getRoot
38 let jsOutput = Just (Output.JavaScript Nothing tempFileName)
39 Project.compile Output.Prod Output.Client jsOutput summary rootPaths
41 result <- BS.readFile tempFileName
42 seq (BS.length result) (Dir.removeFile tempFileName)
46tempFileName :: FilePath
51rootPaths :: [FilePath]
53 [ "src" </> "Errors.elm"
54 , "src" </> "Index.elm"
55 , "src" </> "NotFound.elm"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list