View Source AppGen (app_gen v0.1.1)
AppGen
This tool generates various parts of our elixir applications to simplify our workflows.
generators
Generators
- [x] Absinthe API & Tests
- [x] Ecto Schema
- [x] Ecto Context, Factories & Tests
- [x] State Diff and Regeneration
- [ ] Typespecs for all files
- [ ] Phoenix Application++ (prometheus/sentry)
- [ ] State Transitions
- [ ] Logic Nodes
- [ ] Logic Gateways
installation
Installation
Available in Hex, the package can be installed
by adding app_gen to your list of dependencies in mix.exs:
def deps do
[
{:app_gen, "~> 0.1.0"}
]
endThe docs can be found at https://hexdocs.pm/app_gen.
example
Example
Checkout app_gen.exs for an example
available-mix-commands
Available Mix Commands
mix app_gen # Lists help for app_gen commands
mix app_gen.api # Utilizes all the config files and generates a GraphQL API
mix app_gen.context # Creates a ecto context with functions from EctoShorts as well as tests
mix app_gen.resource # Used to create app_gen.exs files or to add new CRUD resources in
mix app_gen.schema # Creates a ecto schema that has a factory
mix app_gen.phx.new # Create a new phx project, replaces `mix phx.new`
Link to this section Summary
Link to this section Types
@type crud_from_schema_opts() :: [ only: [AbsintheGenerator.CrudResource.crud_type()], except: [AbsintheGenerator.CrudResource.crud_type()], input_args: [ create: arg_opts(), find: arg_opts(), all: arg_opts(), update: arg_opts(), delete: arg_opts(), find_and_update_or_create: arg_opts() ] ]