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"
15 contents <- map (dir </>) `fmap` getDirectoryContents dir
16 let files = filter (\f -> takeExtension f == ext) contents
17 dirs = filter (not . hasExtension) contents
18 filess <- mapM (getFiles ext) dirs
19 return (files ++ concat filess)
22 putStrLn (dropExtension file)
24 length str `seq` return ()
28 system ("elm --only-js " ++ file)
29 let jsFile = replaceExtension file ".js"
34 writeFile rts "Elm = {}; Elm.Native = {}; Elm.Native.Graphics = {};\n\
35 \Elm.Graphics = {}; ElmRuntime = {}; ElmRuntime.Render = {}\n"
36 mapM_ appendJS =<< getFiles ".js" "libraries"
37 mapM_ appendElm =<< getFiles ".elm" "libraries"
38 mapM_ appendJS =<< getFiles ".js" "runtime"
39 putStrLn "\n+------------------------------------------+\
40 \\n| Success building runtime and libraries! |\
41 \\n+------------------------------------------+\n"
42 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