1-- This file compiles all library and runtime code
2-- into compiler/elm-runtime.js. It then rebuilds the compiler.
3-- Run it with the command "runHaskell Build.hs".
12rts = "compiler" </> "elm-runtime.js"
13types = "compiler" </> "types.json"
16 contents <- map (dir </>) `fmap` getDirectoryContents dir
17 let files = filter (\f -> takeExtension f == ext) contents
18 dirs = filter (not . hasExtension) contents
19 filess <- mapM (getFiles ext) dirs
20 return (files ++ concat filess)
23 putStrLn (dropExtension file)
25 length str `seq` return ()
29 system ("elm --only-js " ++ file)
30 let jsFile = replaceExtension file ".js"
35 writeFile rts "Elm = {}; Elm.Native = {}; Elm.Native.Graphics = {};\n\
36 \Elm.Graphics = {}; ElmRuntime = {}; ElmRuntime.Render = {}\n"
37 mapM_ appendJS =<< getFiles ".js" "libraries"
38 files <- getFiles ".elm" "libraries"
40 mapM_ appendJS =<< getFiles ".js" "runtime"
41 putStrLn "\n+------------------------------------------+\
42 \\n| Success building runtime and libraries! |\
43 \\n+------------------------------------------+\n"
44 system ("elm-doc " ++ unwords files ++ " > " ++ types)
45 system ("cabal install compiler" </> "Elm.cabal")
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