madsflensted / elm-brunch

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

Skip compilation for non-main on init. #7

Closed Damirados closed 8 years ago

Damirados commented 8 years ago

I use this plugin for bigger project. I got pretty annoyed with fact that my main module will get compiled dozen of times because there are dozen of .elm files.

With this change when brunch initial encounters .elm file that is not main module it skips it, but if file is changed later on, main modules get recompiled.

Damirados commented 8 years ago

@madsflensted Can you review this change?

madsflensted commented 8 years ago

@Damirados I can see how this can be annoying. Can you add a test case for this scenario?

madsflensted commented 8 years ago

Ok - just pushed a small test case to cover this scenario.

madsflensted commented 8 years ago

@Damirados Thanks for contributing!

madsflensted commented 8 years ago

Pushed to npm in version 0.4.0

Damirados commented 8 years ago

Happy to contribute :). Next time I'll give my best to spell skipped correctly (Saw that just now).

Thanks for writing test case. I'm not familiar with chai, so it would probably take some time to write them.