-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Phoenix Path / Module Utilities #81
Comments
Summary from discussions with @zachdaniel and on Twitter
|
Alright, so what I've come up with really might not be great. We will have to see. But we now have a Phoenix extension that uses module naming heuristics to figure out where a given newly created module ought to go. We can see where this takes us. It is possible that it will need to be reworked to be able to take the zipper contents of what is being created, to peek inside and see what's going on, etc. But for now it will have to do. The remaining things are things I probably won't tackle in the near future. Specifically:
There is no seamless way to allow people to magically adopt this new standard, because they may not be using the function we provide in the first place, and relying on igniter to "do its thing". More realistically there would be some kind of migration task. |
Is your feature request related to a problem? Please describe.
When creating phoenix controllers, they are written to a location not adhering to the phoenix conventions.
MyAppWeb.TestController
=>lib/my_app_web/test_controller.ex
instead oflib/my_app_web/controllers/test.ex
Describe the solution you'd like
Provide
Igniter.Libs.Phoenix.proper_location/2
, and a way to override the path forIgniter.Code.Module.create_module/4
.Additionally, the modules should not be moved to their "correct" location at the end or there should be a convenient function to add it to the
do_not_move
igniter configuration.Describe alternatives you've considered
Express the feature either with a change to resource syntax, or with a change to the resource interface
For example
Additional context
None
The text was updated successfully, but these errors were encountered: