gen_dsl integration with Kino for Livebook. It contains a collection of Smart Cells for configuring Phoenix project templates in terms of code generation Mix Tasks and generating projects given one of these templates.
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 ease of documentation, a suitable format for version control, a collaborative editor, persistent artifacts after project generation.
You can have a look at the examples
folder or jump straight in:
A temporary Livebook hosted instance (password: livebook_playground
)has been set up for users to try out the examples. Just click open and import from one of the repo's urls.
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, or a shared resource like Context
or Schema
.
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.
Copyright (c) 2024 Beltrán Aceves and others, MIT License. See LICENSE for further details.