1-- This file compiles all library and runtime code
2-- into elm-runtime.js. Run it with following command:
6-- Note: This does NOT compile the compiler! Run `cabal install`
7-- from the compiler/ directory to do that.
10import System.Directory
17 contents <- map (dir </>) `fmap` getDirectoryContents dir
18 let files = filter (\f -> takeExtension f == ext) contents
19 dirs = filter (not . hasExtension) contents
20 filess <- mapM (getFiles ext) dirs
21 return (files ++ concat filess)
24 putStrLn (dropExtension file)
26 length str `seq` return ()
27 appendFile "elm-runtime.js" str
30 system ("elm --only-js " ++ file)
31 let jsFile = replaceExtension file ".js"
36 writeFile "elm-runtime.js" "Elm = {}; Elm.Native = {}; Elm.Native.Graphics = {}; Elm.Graphics = {};\n"
37 mapM_ appendJS =<< getFiles ".js" "libraries"
38 mapM_ appendElm =<< getFiles ".elm" "libraries"
39 mapM_ appendJS =<< getFiles ".js" "runtime"
40 putStrLn "Success building runtime and libraries!"
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