Closed 97jaz closed 7 years ago
Come to think of it, the require
lines in application.js are probably a red herring, right? I don't really need the asset pipeline to find these files, just the elm compiler.
Ok, I found the issue. I figured that since source-directories
in elm-package.json
is ["."]
, that meant that the compiler was being run with a cwd of app/assets/elm
, but that's not the case. It's run from the project root with input paths like: app/assets/elm/...
. So I needed to add paths like "app/assets/elm/Api"
to source-directories
(instead of paths like "Api"
). Anyhow, I got it to work. A note in the readme about that would probably be a good idea.
I'm probably doing something wrong, but I can't get elm-make to find all of my modules when going through the asset pipeline. (It works in a repl, so I'm not sure what's going one.)
I have a directory structure like:
where my main module (in app/assets/elm) imports modules from the other directories, and modules in
Models
also depend on a module inApi
. I addedrequire
lines to my app/assets/javascripts/application.js, but when elm-make tries to compile a module in Models that depends on one in Api, it can't find it.Originally my elm-package.json (in the root of the rails project) just had "." in source-directories, so I tried adding "Api" and "Models," but that didn't help.