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! :smile:
Hello! :wave:
I noticed that modern phoenix projects no longer have a
web
directory, opting instead for alib/<project_name>_web
directory. This is mentioned in passing on the "Up and Running" page for Phoenix. Sincealchemist-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 themix.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! :smile: