-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make compilation in onCompile hook instead of compile method #30
Conversation
…ssue with missing changes
@stelmakh thank you for the PR. I have to small requests: You have mixed refactoring (I expect that it is all good stuff) with the new feature making it hard to review the important change at a glance. The tests no longer pass. |
@madsflensted Thanks for the reply. My bad, will fix it as soon as possible. |
Tests has been fixed. As for new feature/refactoring mixing, the only thing that is new is that all the logic is now moved to the onCompile hook instead of the compile method. This allows brunch to update it's cache properly and still be able to compile Elm files. Apart from that change, everything else is the refactoring. |
Thank you for the update. Sorry about the late merge. Will publish new version. |
Great, thanks a lot! |
It looks like this PR is changing the order of compilation. With 0.7.0 Elm files were compiled early, before everything else, so that the resulting .js files could have been picked up by brunch and concatenated in one go. With 0.8.0 Elm files are compiled at the very end, after concatenation is done. This still works with |
Yeah i'm also noticing what @wpiekutowski mentioned. having elm run after compile bypasses any other js-related brunch plugins you might be using. |
There were some reports about brunch missing changes in elm files after compilation error occurred. Here's the original StackOverflow question.
As I've mentioned on the StackOverflow
Running the compilation in the
onCompile
hook instead of thecompile
method is more suitable in this case.