gen_dsl integration with Kino for Livebook. It contains a collection of Smart Cells for configuring and executing Phoenix project templates in terms of code generation Mix Tasks.
Phoenix mix phx.gen
commands are powerful but uncomfortable. They are repetitive, error-prone, lack good in-terminal documentation and don't lend themselves to an iterative design process. With GenEditor you can bring them into Livebook and enjoy its benefits (ease of documentation, suitable for version control, collaborative editor, persist artifacts).
To bring GenEditor to Livebook all you need to do is Mix.install/2
:
Mix.install([
{:gen_editor, "~> 0.3.2"}
])
GenEditor is an alternative way to define and execute Phoenix Mix commands for code generation. It allows you to use Smart Cells to configure a template file containing all the desired Mix commands, and execute it within Livebook.
Each cell configures a mix phx.gen
task, with the exception of the Context
and Module
cells, used to share resource namespaces between elements.
At the moment you can only configure a single template file and application per Livebook notebook. Each notebook must contains at least a cell of type App and cell of type Blueprint to generate a template file.