Integration of Elm Application's `update` function with Redux DevTools Extension. An alterative to the official Elm Debugger.
Switch branches/tags
Nothing to show
Clone or download
utkarshkukreti refactor: move {src,dist}/main.js to {src,dist}/0.18.js
The output at dist/main.js will be kept for now so as to not break the
functionality for users already hotlinking to it.
Latest commit 3e91443 Jun 6, 2018
Permalink
Failed to load latest commit information.
dist
src
.gitattributes
.gitignore
README.md
package.json
yarn.lock

README.md

elm-remotedev

This project contains code that allows you to intercept calls to your Elm App's update function and send the message and model to the Redux DevTools Extension.

Demo

Demo GIF

Usage

Elm 0.18 / elm-lang/core 5.x.x

Running this with Elm 0.18 requires a one line patch to the JS code of Elm's elm-lang/core package.

  1. Install the Redux DevTools extension for Firefox or Google Chrome.

  2. Open elm-stuff/packages/elm-lang/core/5.1.1/src/Native/Platform.js and around line 120, just below model = results._0;, add the following line:

    typeof ElmRemoteDev !== 'undefined' && ElmRemoteDev.send(msg, model);
    

    Your code should now look like:

    ...
    model = results._0;
    typeof ElmRemoteDev !== 'undefined' && ElmRemoteDev.send(msg, model);
    updateView(model);
    ...
    
  3. Include the following script in your page, preferably before you mount your application:

    <script src="https://cdn.rawgit.com/utkarshkukreti/elm-remotedev/master/dist/main.js"></script>
    

Now recompile your app and reload it in your browser and you'll see every call to update being logged in the extension window.