madsflensted / elm-brunch

Brunch plugin to compile Elm code
MIT License
74 stars 31 forks source link

Allow mainModules to keep their own elm-stuff folder #41

Closed neildaemond closed 6 years ago

neildaemond commented 6 years ago

I've added an 'independantModules' configuration option which allows us to keep separate 'elm-stuff' folders at the 'source/path' of our mainModules.

Reason for this feature: I use elm-brunch along with Elixir's Phoenix Web Framework, where I create an 'elm' folder under assets and would like to keep independent elm modules as widgets to use on different pages in my web app. I would like to be able to update one widget without affecting another in the future.

madsflensted commented 6 years ago

Thank you for the contribution! I have only had time for a brief look-through, and I have a question, will your code work on Windows? (with \path\to\elmfolder)

neildaemond commented 6 years ago

Hi, it may not be windows compatible yet. I'll try add that in..

madsflensted commented 6 years ago

Great I will give it a further look in the coming days.

neildaemond commented 6 years ago

In my code I've now used path.sep instead of '/' so that the proper path separator will be used in windows. It should work on windows now.

madsflensted commented 6 years ago

Nice, will merge and publish a new version.

madsflensted commented 6 years ago

Published as 0.11.0. Thank you for contributing!