1{-# OPTIONS_GHC -Wall #-}
2{-# LANGUAGE OverloadedStrings #-}
3module Develop.StaticFiles.Build
10import Control.Monad (void)
11import qualified Data.ByteString as BS
12import qualified System.Directory as Dir
13import System.FilePath ((</>))
15import qualified Elm.Compiler.Objects as Obj
16import qualified Elm.Project as Project
17import qualified Elm.Project.Flags as Flags
18import qualified Reporting.Task as Task
19import qualified Reporting.Progress.Terminal as Terminal
26readAsset :: FilePath -> IO BS.ByteString
28 BS.readFile ("ui" </> "assets" </> path)
35compile :: IO BS.ByteString
37 if True then return "TODO" else
38 do Dir.setCurrentDirectory "ui"
40 reporter <- Terminal.create
41 void $ Task.run reporter $
42 do summary <- Project.getRoot
43 Project.compile options summary rootPaths
45 result <- BS.readFile tempFileName
46 seq (BS.length result) (Dir.removeFile tempFileName)
48 Dir.setCurrentDirectory ".."
53options :: Flags.Options
55 Flags.Options Obj.Prod Obj.Client $
56 Just (Flags.Custom Nothing tempFileName)
59tempFileName :: FilePath
64rootPaths :: [FilePath]
66 [ "src" </> "Errors.elm"
67 , "src" </> "Index.elm"
68 , "src" </> "Start.elm"
69 , "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