on master help sign in
move the home of the data files out of dist/ (cabal complained)
e81e0c4Evan Czaplicki
Elm.cabal+1−1
@@ -21,7 +21,7 @@ Category: Compiler, Language
21Build-type: Custom
21Build-type: Custom
22
22
23Extra-source-files: changelog.txt
23Extra-source-files: changelog.txt
24−Data-dir: dist/data
24+Data-dir: data
25Data-files: elm-runtime.js interfaces.data
25Data-files: elm-runtime.js interfaces.data
26Cabal-version: >=1.9
26Cabal-version: >=1.9
27
27
Setup.hs+7−7
@@ -33,10 +33,10 @@ import qualified Data.ByteString.Lazy as BS
33-- Elm.cabal expects the generated files to end up in dist/data
33-- Elm.cabal expects the generated files to end up in dist/data
34-- git won't look in dist + cabal will clean it
34-- git won't look in dist + cabal will clean it
35rtsDir :: LocalBuildInfo -> FilePath
35rtsDir :: LocalBuildInfo -> FilePath
36−rtsDir lbi = buildDir lbi </> ".." </> "data"
36+rtsDir lbi = "data"
37
37
38tempDir :: LocalBuildInfo -> FilePath
38tempDir :: LocalBuildInfo -> FilePath
39−tempDir lbi = buildDir lbi </> ".." </> "temp"
39+tempDir lbi = "temp"
40
40
41-- The runtime is called:
41-- The runtime is called:
42rts :: LocalBuildInfo -> FilePath
42rts :: LocalBuildInfo -> FilePath
@@ -96,18 +96,18 @@ myPostBuild as bfs pd lbi = do
96 buildInterfaces lbi elmis
96 buildInterfaces lbi elmis
97 putStrLn "Custom build step: build elm-runtime.js"
97 putStrLn "Custom build step: build elm-runtime.js"
98 buildRuntime lbi elmos
98 buildRuntime lbi elmos
99− removeDirectoryRecursive ("dist" </> "temp")
99+ removeDirectoryRecursive (tempDir lbi)
100 postBuild simpleUserHooks as bfs pd lbi
100 postBuild simpleUserHooks as bfs pd lbi
101
101
102
102
103compileLibraries lbi = do
103compileLibraries lbi = do
104− let temp = tempDir lbi -- dist/temp
104+ let temp = tempDir lbi -- temp
105− rts = rtsDir lbi -- dist/data
105+ rts = rtsDir lbi -- data
106 createDirectoryIfMissing True temp
106 createDirectoryIfMissing True temp
107 createDirectoryIfMissing True rts
107 createDirectoryIfMissing True rts
108− out_c <- canonicalizePath temp -- dist/temp (root folder)
108+ out_c <- canonicalizePath temp -- temp (root folder)
109 elm_c <- canonicalizePath (elm lbi) -- dist/build/elm/elm
109 elm_c <- canonicalizePath (elm lbi) -- dist/build/elm/elm
110− rtd_c <- canonicalizePath rts -- dist/data (for docs.json)
110+ rtd_c <- canonicalizePath rts -- data
111
111
112 let make file = do
112 let make file = do
113 -- replace 'system' call with 'runProcess' which handles args better
113 -- replace 'system' call with 'runProcess' which handles args better