Closed RobertSwirsky closed 7 years ago
@chatterbeak thanks, will take a look at this
@chatterbeak was the atom for your application :ui_x_web
?
My project was called ui_x I think that's what the problem was....
Ah, so your project was :ui_x
but the module name for something like a controller would have been UiXWeb.Web.PageController
? Maybe I could add a command line option for manually naming the web module and application name
Thanks for creating this mix item. I was in the process of doing the phoenix/elm integration when I found your contribution.
I also encountered the issue entered by chatterbeak. It seems that you may have an extra dot "." in a couple of sources used to generate the project.
Specifically:
~/projects/
defmodule <%= app_name %>.Web.ElmController do use <%= app_name %>.Web, :controller
def index(conn, _params) do render conn, "index.html" end end
and,
~/projects/
defmodule <%= app_name %>.Web.ElmView do use <%= app_name %>.Web, :view end
The dot "." after "<%= app_name %>" in both modules are resulting in a different name than that generated in the rest of the app files. I removed these dots from these modules in the phx.gen.elm mix project and everything then build and executed without error. I would be happy to make these changes in a pull request (I am fairly new to git).
@colecullen hey, sorry has taken me a while to take a look at this, this looks good, will merge in
closed with pr #7
It should be UiXWeb (given my project name) Not sure where the dot is coming from. I manually changed it and it's happy