Open rudolfb opened 8 years ago
I don't have a platform to reproduce this error - but I suspect it relates to the "mainModules" setting - and that elm-brunch does not recognize the main module due to the non-windows path spec. All non-main modules are skipped on first alert from brunch - since brunch at startup will send events for all files.
maybe you can try to change brunch config to:
mainModules: ["web\\static\\elm\\Chat.elm"]
and see what that does?
You could also run brunc with --debug
and see if files are detected and processed.
Hi Mads,
Sorry for the late reply. Easter belonged to my daughter.
Changed the brunch-config.js to
elmBrunch: {
mainModules: ["web\\static\\elm\\Chat.elm"]
}
and the chat.js file is now automatically created on running
mix phoenix.server
So this seems to resolve my problem on Windows. Thanks. Now I just need to see if this works on Linux and Mac.
Regards
Rudolf
Hi Mads,
Ok, tested on Linux, and changing the path to
elmBrunch: {
mainModules: ["web\\static\\elm\\Chat.elm"]
}
failed to compile the Chat.elm to chat.js. Is this something you would have to implement in elm-brunch, to convert the path seperators from /
to \\
on Windows?
Regards
Rudolf
Ok, Good to hear.
The whole plugin is due for an overhaul based on the new plugin structure brunch uses, so a general fix for this Windows / Linux path issue would go with that release. On Mar 29, 2016 17:26, "Rudolf Bargholz" notifications@github.com wrote:
Hi Mads,
Ok, tested on Linux, and changing the path to
elmBrunch: { mainModules: ["web\\static\\elm\\Chat.elm"] }
failed to compile the Chat.elm to chat.js. Is this something you would have to implement in elm-brunch, to convert the path seperators from / to \ on Windows?
Regards
Rudolf
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/madsflensted/elm-brunch/issues/16#issuecomment-202952090
Problem
On windows it seems as if, after cloning a repo, the elm files are not compiled. Only after changing the contents of every elm file, then saving each file, does elm-brunch recognize the change in the file and compiles the elm file to a js file.
Mac OSX and Linux (Ubuntu 15) work fine. The problem only happens on Windows. I have reproduced this on two different Windows workstations.
Repo: https://github.com/svard/hello_phoenix
The problem with reproducing this issue with this repo is, the project is a phoenix/Elixir project with Elm as the frontend rendering tool. If you need to reproduce the problem with the above repo, it is relatively straightforward:
Install chocolatey
In the projects root folder:
The Elm file is in the folder
web\static\elm
The compiled js file is written to the folder
priv\static\js
Hope this is enough information regarding this issue.
Regards
Rudolf Bargholz
Information
0.4.4
2.5.2
5.9.0
/web/static/elm/
Windows 10