@@ -15,6 +15,7 @@ import qualified Data.Time.Clock.POSIX as Time
1515import qualified System.Directory as Dir
1616import qualified System.Exit as SysExit
1717import System.FilePath ((</>), takeExtension, takeFileName)
18+import System.IO (hSetBuffering, stdout, BufferMode(..))
1819import qualified System.Process as Process
1920
2021import qualified BackgroundWriter as BW
@@ -44,7 +45,8 @@ data Flags =
4445
4546run :: FilePath -> Flags -> IO ()
4647run path (Flags maybePort) =
47− do maybeRoot <- Stuff.findRoot
48+ do hSetBuffering stdout LineBuffering
49+ maybeRoot <- Stuff.findRoot
4850 case maybeRoot of
4951 Nothing ->
5052 putStrLn "I cannot find an elm.json file. Run `lynxjs-elm init` first."
@@ -79,7 +81,10 @@ run path (Flags maybePort) =
7981 -- Start static file server in background
8082 let distDir = bundlerDir </> "dist"
8183 let serveProc = (Process.proc "npx" ["serve", "-l", show port, "-n", distDir])
82− { Process.cwd = Just bundlerDir }
84+ { Process.cwd = Just bundlerDir
85+ , Process.std_out = Process.NoStream
86+ , Process.std_err = Process.NoStream
87+ }
8388 (_, _, _, serveHandle) <- Process.createProcess serveProc
8489
8590 -- Print bundle URL