elm-server 0.11 → 0.11.0.1
raw patch · 3 files changed
+31/−5 lines, 3 filesdep ~Elm
Dependency ranges changed: Elm
Files
- README.md +26/−0
- Server.hs +1/−1
- elm-server.cabal +4/−4
+ README.md view
@@ -0,0 +1,26 @@+# Elm Server++This is a simple server to make it easier to develop Elm projects. It lets you+view Elm files in your browser and recompile them by refreshing the page.++#### Install++It comes bundled with the Elm Platform or you can install it individually with+`cabal install elm-server`.+++#### Use++Navigate to the Elm project you want to work on. In that directory run:++```bash+elm-server+```++This will start the server at [http://localhost:8000](http://localhost:8000).+If you want to use a different port, use the `--port` flag (e.g. `elm-server+--port 8080`). In your browser you can navigate through your project and see how+each Elm page looks.++`elm-server` will serve any kind of static content, so you can also look at HTML,+images, JSON, or whatever else you may need to serve.
Server.hs view
@@ -94,7 +94,7 @@ onSuccess (compile file) (serve file) where compile file =- let elmArgs = [ "--make", "--runtime=" ++ runtimeName, file ]+ let elmArgs = [ "--make", "--set-runtime=" ++ runtimeName, file ] in createProcess $ (proc "elm" elmArgs) { std_out = CreatePipe } serve file =
elm-server.cabal view
@@ -1,5 +1,5 @@ Name: elm-server-Version: 0.11+Version: 0.11.0.1 Synopsis: Server for developing Elm projects Description: Provides a standalone Snap server that serves static files. For Elm files, it recompiles them and serves them as HTML,@@ -18,12 +18,12 @@ Build-type: Simple ---Extra-source-files: README.md+Extra-source-files: README.md Cabal-version: >=1.8 source-repository head type: git- location: git://github.com/evancz/Elm.git+ location: git://github.com/elm-lang/elm-server.git Executable elm-server Main-is: Server.hs@@ -33,7 +33,7 @@ containers >= 0.3, directory, filepath,- Elm >= 0.11,+ Elm >= 0.12.3, snap-core, snap-server, mtl,