Thanks to visit codestin.com
Credit goes to github.com

Skip to content

PragTob/degenerator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Degenerator

Generators can be a helpful tool in writing idiomatic elixir code quickly. Why not take things a step further and make a generator for generators?

Degenerator takes a module that you give it and creates a generator for that module.

Instalation

While this is in ealry stages, this will be available on github:

def deps do
  [
    {:degenerator, github: "baradoy/degenerator", only: :dev}
  ]
end

Or you can install it through mix archive:

mix archive.install github baradoy/degenerator

Usage

You can create a generator from an existing module with:

mix degenerator --module MyProject.MyModule --generator degenerator.gen.my_generator

Subsequent runs of degenerator will add to the new module template to the existing generator.

Roadmap

  • A big refactor to organize code and reduce complexity and add tests
  • Support module names with prefix or suffixes such as `MyProjectWeb.MyModuleController,
  • Supoport conditional sections, i.e. --no-schema

Limitations

  • The generators that are created rely on Phoenix.Mix as at least a dev dependancy.
  • This might not work with umbrella projects in the slightest.

Bugs

  • Does not detect ProjectWeb correctly

About

Create Elixir generators from existing modules

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 87.5%
  • HTML 12.5%