Skip to content

Kino smart cells editor for Phoenix's excelent phx.gen code generation command

License

Notifications You must be signed in to change notification settings

beltranaceves/gen_editor

Repository files navigation

GenEditor

Docs

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.

app

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:

d

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.

Installation

To bring GenEditor to Livebook all you need to do is Mix.install/2:

Mix.install([
  {:gen_editor, "~> 0.3.2"}
])

Use and examples

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.

License

Copyright (c) 2024 Beltrán Aceves and others, MIT License. See LICENSE for further details.

About

Kino smart cells editor for Phoenix's excelent phx.gen code generation command

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published