@@ -13,9 +13,7 @@ import System.FilePath
1313import System.IO
1414import GHC.Conc
1515
16−import qualified Text.Blaze.Html.Renderer.Pretty as Pretty
17−import qualified Text.Blaze.Html.Renderer.String as Normal
18−import qualified Text.Jasmine as JS
16+import Text.Blaze.Html.Renderer.Pretty (renderHtml)
1917import qualified Data.ByteString.Lazy.Char8 as BS
2018import qualified Data.ByteString.Lazy as L
2119
@@ -25,7 +23,7 @@ import SourceSyntax.Module
2523import Parse.Module (getModuleName)
2624import Initialize (buildFromSource, getSortedDependencies)
2725import Generate.JavaScript (jsModule)
28−import Generate.Html (createHtml, JSStyle(..), JSSource(..))
26+import Generate.Html (createHtml, JSSource(..))
2927import Paths_Elm
3028
3129import SourceSyntax.PrettyPrint (pretty, variable)
@@ -42,7 +40,6 @@ data Flags =
4240 , print_program :: Bool
4341 , scripts :: [FilePath]
4442 , no_prelude :: Bool
45− , minify :: Bool
4643 , cache_dir :: FilePath
4744 , build_dir :: FilePath
4845 }
@@ -64,8 +61,6 @@ flags = Flags
6461 &= help "Load JavaScript files in generated HTML. Files will be included in the given order."
6562 , no_prelude = False
6663 &= help "Do not import Prelude by default, used only when compiling standard libraries."
67− , minify = False
68− &= help "Minify generated JavaScript and HTML"
6964 , cache_dir = "cache" &= typFile
7065 &= help "Directory for files cached to make builds faster. Defaults to cache/ directory."
7166 , build_dir = "build" &= typFile
@@ -184,11 +179,11 @@ build flags rootFile = do
184179 (extension, code) <- case only_js flags of
185180 True -> do
186181 putStr "Generating JavaScript ... "
187− return ("js", genJs js)
182+ return ("js", js)
188183 False -> do
189184 putStr "Generating HTML ... "
190185 rtsPath <- getRuntime flags
191− return ("html", BS.pack . genHtml $
186+ return ("html", BS.pack . renderHtml $
192187 createHtml rtsPath (takeBaseName rootFile) (sources js) moduleName "")
193188
194189 let targetFile = buildPath flags rootFile extension
@@ -202,10 +197,7 @@ build flags rootFile = do
202197 do src <- BS.readFile (elmo flags filePath)
203198 return (BS.append src js)
204199
205− genHtml = if minify flags then Normal.renderHtml else Pretty.renderHtml
206− genJs = if minify flags then JS.minify else id
207− sources js = map Link (scripts flags) ++
208− [ Source (if minify flags then Minified else Readable) js ]
200+ sources js = map Link (scripts flags) ++ [ Source js ]
209201
210202
211203buildFiles :: Flags -> Int -> Interfaces -> String -> [FilePath] -> IO (String, Interfaces)