ash-project / igniter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Options for ignore files when moving and for configuring module locations

zachdaniel opened this issue · comments

For example:

# This is a configuration file for igniter.
# For option documentation, see hexdocs.pm/igniter/Igniter.Project.IgniterConfig.html
# To keep it up to date, use `mix igniter.setup`

[
  module_location: :outside_matching_folder,
  dont_move_files: [
    ~r/file_paths/,
    "lib/this_file.ex"
  ],
  module_names: %{
    ~r/MyAppWeb\..*Controller/ => "lib/my_app_web/controllers"
    ~r/MyAppWeb\..*Live/ => "lib/my_app_web/live"
    ~r/MyAppWeb\..*Views/ => "lib/my_app_web/views",
    "This.Specific.Module" => "lib/this_place"
  }
]

We've done everything but the module_names feature, which actually needs to be a bit more complex because in that instance the _controller.ex is stripped off of the end. Will need to figure out how to model those conventions, otherwise folks will need to add lots of dont_move_files configurations.

I think module_names will likely need to be regexes as keys and functions as values.