https://github.com/beltranaceves/gen_editor
Kino smart cells editor for Phoenix's excelent phx.gen code generation command
https://github.com/beltranaceves/gen_editor
Last synced: 3 months ago
JSON representation
Kino smart cells editor for Phoenix's excelent phx.gen code generation command
- Host: GitHub
- URL: https://github.com/beltranaceves/gen_editor
- Owner: beltranaceves
- License: mit
- Created: 2023-02-28T00:09:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-29T01:40:49.000Z (about 1 year ago)
- Last Synced: 2024-05-29T15:32:44.320Z (about 1 year ago)
- Language: JavaScript
- Size: 85 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# GenEditor
[](https://hexdocs.pm/gen_editor)[gen_dsl](https://github.com/beltranaceves/gen_dsl) integration with [Kino](https://github.com/livebook-dev/kino) for [Livebook](https://livebook.dev/). It contains a collection of Smart Cells for configuring [Phoenix](https://www.phoenixframework.org/) project templates in terms of code generation [Mix Tasks](https://hexdocs.pm/phoenix/Mix.Tasks.Phx.Gen.html) 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:
[](https://livebook.dev/run?url=https%3A%2F%2Fgithub.com%2Fbeltranaceves%2Fgen_editor%2Fblob%2Fmain%2Fexamples%2Fauth_users_comments_admin.livemd)
A temporary Livebook [hosted instance](https://huggingface.co/spaces/beltranaceves/livebook) (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`:
```elixir
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](https://github.com/beltranaceves/gen_editor/blob/main/LICENSE) for further details.