An Elm Platform.worker
that runs elm repl
internally.
It communicates with your app via ports.
The REPL uses a port of the Elm compiler from Haskell to Elm.
For more information see the recording of the August 2024 Elm Online Meetup:
https://www.youtube.com/watch?v=OK9S_HUdReA.
make
or
elm make src/Repl/Worker.elm --output dist/worker.js
In branch clients
there are examples for adding the REPL worker to an Elm app:
-
Loading the REPL Worker at Startup
-
eager-tea.html - Adds the REPL worker to a normal TEA app - Live demo
-
eager-io.html - Adds the REPL worker to an app using the IO monad of the Elm compiler port - Live demo
-
-
Loading the Repl Worker on Demand
-
lazy-tea.html - Adds the REPL worker to a normal TEA app - Live demo
-
lazy-io.html - Adds the REPL worker to an app using the IO monad of the Elm compiler port - Live demo
-