Mix.Raxol.Content (Raxol v2.9.2)

View Source

Boilerplate content generators for mix raxol.new.

All functions return strings of generated file content.

Summary

Functions

Generates the main module when --sup is used.

Generates the app test file content based on template.

Generates Application module for --sup.

Generates GitHub Actions CI workflow YAML.

Generates config/config.exs content.

Generates .formatter.exs content.

Generates .gitignore content.

Generates Phoenix LiveView bridge module.

Generates .mise.toml content.

Generates mix.exs content.

Generates README.md content.

Generates SSH server module.

Generates TEA app module (lib/app/app.ex with --sup).

Generates standalone TEA app module (lib/app.ex without --sup).

Generates test/test_helper.exs content.

Functions

app_module_sup(map)

Generates the main module when --sup is used.

app_test(map)

Generates the app test file content based on template.

application_module(map)

Generates Application module for --sup.

Its children are what mix run --no-halt runs: the TUI, or with --ssh the SSH server that runs the TUI per connection. The TUI runs under a process that stops the VM --no-halt keeps up once the TUI exits (0 when the user quit, 1 when it failed), and that stops only the TUI when the application is stopped. Under IEx the TUI is not started: it would read the keys typed into IEx, and IEx would evaluate them.

ci_workflow(bindings)

Generates GitHub Actions CI workflow YAML.

config_exs(map)

Generates config/config.exs content.

A --sup app's Application reads the TUI's options from config :<app>, :raxol. With --ssh, <Module>.SSH.start/1 and the --sup Application read the SSH server's from config :<app>, :ssh, so those sections are live config.

formatter()

Generates .formatter.exs content.

gitignore()

Generates .gitignore content.

liveview_module(bindings)

Generates Phoenix LiveView bridge module.

mise_toml()

Generates .mise.toml content.

mix_exs(map)

Generates mix.exs content.

readme(bindings)

Generates README.md content.

ssh_module(bindings)

Generates SSH server module.

start/1 serves with the options under config :<app>, :ssh, which config_exs/1 fills in: Raxol.SSH.Server refuses to start without authentication settings.

tea_module(bindings)

Generates TEA app module (lib/app/app.ex with --sup).

tea_module_standalone(bindings)

Generates standalone TEA app module (lib/app.ex without --sup).

The module starts itself through start/0; nothing runs at the top level, which mix compile would execute.

test_helper()

Generates test/test_helper.exs content.