Apprentice icon indicating copy to clipboard operation
Apprentice copied to clipboard

Support the app_web directory

Open akirak opened this issue 2 years ago • 4 comments

Hello, apprentice-phoenix.el assumes that every Phoenix project contains web directory under its root directory, but the default location is lib/APP_web since Phoenix 1.3. Apparently, the library needs an update.

akirak avatar Mar 18 '23 13:03 akirak

Thanks for the issue!

I wasn't using this minor mode so this flew under the radar, in any case, this last commit https://github.com/Sasanidas/Apprentice/commit/a79103eecb402bf1de9148ddf7e99cc5267eed7b should have fix the issues.

I still have to update the tests to reflect the changes, but the functionality should be there.

Regards.

Sasanidas avatar Mar 19 '23 11:03 Sasanidas

I guess this issue is solved?

I'll close it, feel free to open it again if the issue wasn't solved :+1:

Sasanidas avatar Apr 07 '23 12:04 Sasanidas

Thank you for the update. Because Phoenix has changed how it organizes a project into directories, not all commands work.

The following navigation commands work:

  • [X] controllers
  • [X] channels
  • [X] router

The following do not work:

  • [ ] templates: Now reside in components directory
  • [ ] views: Now reside in controllers and live (new) directory
  • [X] models: Now reside in lib/APP directory
  • [X] static: Changed to priv/static directory
  • [X] routes: Changed from phoenix.routes to phx.routes

Besides, the following directories typically exist in a Phoenix project, but there are no dedicated commands for them:

  • [ ] APP_web/live

I have created a PR (#9) to resolve these issues. I am not sure how many users are interested in these commands, but they are convenient and trivial to implement.

akirak avatar Apr 07 '23 15:04 akirak

I reopened the issue, that's a nice list, it would be also interesting to add some tests to it (or even support multiple Phoenix versions, tho I don't know how much overhead can this introduce)

Sasanidas avatar Apr 07 '23 15:04 Sasanidas