elm-reactor: Interactive development tool for Elm programs

[ bsd3, compiler, deprecated, language, program ] [ Propose Tags ]
Deprecated

Provides an interactive development tool that makes it easy to develop and debug Elm programs. It will automatically compile any Elm program—independent of editor. It permits hot-swapping and time-traveling debugging.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1, 0.2, 0.2.0.1, 0.3, 0.3.1
Dependencies base (>=4.2 && <5), blaze-html, blaze-markup, bytestring, cmdargs, containers (>=0.3), directory (>=1.2), Elm (>=0.13), filepath, fsnotify (>=0.1.0.2), HTTP, mtl, process, snap-core, snap-server, system-filepath, time, transformers, unordered-containers, websockets (>=0.9 && <0.10), websockets-snap (>=0.8.2.1) [details]
License BSD-3-Clause
Copyright Copyright: (c) 2011-2014 Evan Czaplicki
Author Evan Czaplicki
Maintainer info@elm-lang.org
Category Compiler, Language
Home page http://elm-lang.org
Source repo head: git clone git://github.com/elm-lang/elm-reactor.git
Uploaded by EvanCzaplicki at 2014-09-22T06:31:28Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables elm-reactor
Downloads 5462 total (13 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2015-05-27 [all 6 reports]

Readme for elm-reactor-0.1

[back to package description]

Elm Reactor

Interactive development tool that makes it easy to develop and debug Elm programs. Key features include:

This means you can get a great development experience whether you are using Sublime Text, emacs, vim, or whatever else to edit Elm code.

Install

Install Elm Platform. This will install Elm Reactor and everything else it needs.

Use

Navigate to the Elm project you want to work on. A great project to get started with is elm-examples which contains a simple Mario game and todo list app, both setup to be fun to debug.

In the root of your Elm project start the reactor with:

elm-reactor

Now open http://localhost:8000 in your browser. You should see a navigation page for your project.

Click on any file to see what it looks like. For example, you can navigate to an Elm file and try it out. If you modify the file, you can just refresh that page and see the new version!

Time Travel Debugging

To use the debugger, click the small wrench next to every Elm file. This will start your Elm program with a control panel that lets you:

  • Pause, rewind, and continue from any point.

  • Add watches and traces to track and visualize values over time.

  • Hot-swap in new code at any time, maintaining all recorded events.

Debugging code embedded in HTML

To use the debugger with more complex HTML or CSS, you may want to start the debugger from within an HTML file.

In your custom HTML file load the /debugger.js script right after you load elm-runtime:

<script type="text/javascript" src="/elm-runtime.js"></script>
<script type="text/javascript" src="/debugger.js"></script>

That creates the Elm.debugFullscreen function so you can initiate your Elm program with the debugger:

var runningElmModule = Elm.debugFullscreen(Elm.Todo, "todo.elm");

The argument "todo.elm" is the file path to the root module of your project, the one with a main value. This file path makes it possible to hot-swap when you change any relevant code.