madsflensted / elm-brunch

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

ignore elm-stuff elm files in brunch watched #10

Open madsflensted opened 8 years ago

madsflensted commented 8 years ago

Problem: on initial run brunch fires add events for all elm files in the elm-stuff folder when elm files are in subfolder.

simonh1000 commented 8 years ago

If this means when my source code is in e.g. /src then I think I am experiencing it, and it's leading to the watches failing pretty regularly

lessless commented 8 years ago

@madsflensted is this an brunc or elm-brunch issue?

madsflensted commented 8 years ago

@lessless it is an issue that can easily be handled by adding an elm-stuff pattern toignored in conventions brunch option. But I thought it would be good if elm-brunch would either ignore files from elm-stuff or at least warn about being called with such files and provide the information on how to set configuration.

lessless commented 8 years ago

@madsflensted thank you for clarification!

tommcgurl commented 7 years ago

👍 Thanks @madsflensted for the suggestion. I was facing the same issue and adding the ignored property to my brunch config did the trick. I definitely think adding the warning or even ignoring by default would be super helpful. I'd be happy to take a look and see if I can add that with a PR if this is something everyone would find useful and fitting for this repo.

tommcgurl commented 7 years ago

After taking a look it seems like this issue is out of the scope of elm-brunch. The purpose of this plugin is simply to run elm make on your specified elm directory in order to compile your elm code. The issue that I'm seeing happens when brunch itself tries to build javascript code within the elm-stuff directory. Is this issue the same for everyone else?

Specifically, I was seeing errors when importing the elm-css package within my elm application. The elm-css package contains some javascript that brunch was not ignoring.