View Source ExTerm (ex_term v0.1.0)

description

Description

ExTerm is an IEx console LiveView component. The IEx console is responsible for converting your interactions with the browser into erlang IO protocol so that you can execute code from your browser.

installation

Installation

  1. Add ExTerm to your mix.exs:

def deps do
  [
    # ...
    {:ex_term, "~> 0.1"}
    # ...
  ]
end
  1. Connect the ex_term CSS:
  • if you're using a css bundler, add to your "app.css" (or other css file in your assets directory)

    @import "../../deps/ex_term/lib/css/default.css";
  • you may need a different strategy if you aren't using a css bundler.

  1. Create a live view in your routes
  • as a standalone liveview

    scope "/" do
      pipe_through :browser
      pipe_through :extra_authorization
    
      live "/", ExTerm
    end
  • you can also use it as a live component!

    <.live_component module={ExTerm}/>

not-implemented-yet-soon

Not implemented yet (soon):

  • up arrow (history)
  • tab completion
  • copy/paste

planned-pro-features

Planned (Pro?) features:

  • provenance tracking
  • multiplayer mode

Link to this section Summary

Link to this section Functions

Link to this function

handle_event(type, payload, socket)

View Source

Callback implementation for Phoenix.LiveView.handle_event/3.

Link to this function

handle_info(arg, socket)

View Source

Callback implementation for Phoenix.LiveView.handle_info/2.

Callback implementation for Phoenix.LiveView.mount/3.

Callback implementation for Phoenix.LiveView.render/1.