fbonetti / elm-rails

View helpers for incorporating Elm modules into Rails views
MIT License
75 stars 20 forks source link

Sprockets with working cache/dependency handling #12

Closed lsimoneau closed 7 years ago

lsimoneau commented 7 years ago

I've been working off @mariochavez's branch from https://github.com/fbonetti/elm-rails/pull/7, but noticed that if an import ed file was changed it didn't trigger a recompile.

I had a look, and was able to get it working by adapting some bits from this gist https://gist.github.com/rtfeldman/db7b121100b6c6ff435b. I may have misunderstood something, but I can't see why a list of all dependencies was passed to the compiler, since it knows how to process the import directives, but Sprockets doesn't. What's needed in the dependency handling is informing sprockets that the file needs watching.

Let me know if there's anything else you need, or if you can see I've done something wrong.

botandrose commented 7 years ago

Great to see these commits landing!