Skip to content

Conversation

@J3RN
Copy link

@J3RN J3RN commented Oct 4, 2018

Hello! 👋

I noticed that modern phoenix projects no longer have a web directory, opting instead for a lib/<project_name>_web directory. This is mentioned in passing on the "Up and Running" page for Phoenix. Since alchemist-phoenix-project-p looks for a project-root "web" directory, it was failing to detect my phoenix projects.

I figured it would be difficult to ascertain the name of the project in order to check for a lib/<project_name>_web directory explicitly, I opted instead to check whether the string ":phoenix" occurs in the mix.exs file of the project. This would be expected in the dependencies section of that file.

We could, alternately, check for the existence of a lib/*_web directory. I'm totally open to feedback on this! 😄

J3RN added 2 commits October 3, 2018 20:30
Unfortunately, modern phoenix projects no longer have a "web"
directory, opting instead for a "lib/<project_name>_web"
directory. This is mentioned in passing on the "Up and Running" page
for Phoenix: https://hexdocs.pm/phoenix/up_and_running.html#content.

Since it would be difficult to ascertain the name of the project in
order to check this directory explicitly, I opted instead to check
whether the string ":phoenix" occurs in the "mix.exs" file of the
project. This would be expected in the dependencies section of that
file.

We could, alternately, check for the existence of a "lib/*_web"
directory.
@J3RN
Copy link
Author

J3RN commented Oct 4, 2018

On second look, I appear to have duplicated #321. I'll try to base my work off of @gebrek's, as his is a more complete solution.

@J3RN
Copy link
Author

J3RN commented Oct 4, 2018

Closing in favor of #352

@J3RN J3RN closed this Oct 4, 2018
@J3RN J3RN deleted the update_alchemist-phoenix-project-p branch October 4, 2018 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant