Skip to content
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

Colorize "elm-pages build" output #66

Closed
ad-si opened this issue Feb 6, 2020 · 6 comments · Fixed by #68
Closed

Colorize "elm-pages build" output #66

ad-si opened this issue Feb 6, 2020 · 6 comments · Fixed by #68

Comments

@ad-si
Copy link

ad-si commented Feb 6, 2020

Looks a little blunt right now 😉

image

@dillonkearns
Copy link
Owner

Hey! Thanks for reporting the issue, and good point.

Looks like it's related to this issue: rtfeldman/node-elm-compiler#91.

That issue points out a hack that provides a workaround (by compiling it a second time if there's a failure). I guess I could fork the code and use that 🤷‍♂ Not great, but it would be nice to have nicely formatted error messages.

@ad-si
Copy link
Author

ad-si commented Feb 8, 2020

Yesterday someone posted a solution without compiling twice: rtfeldman/node-elm-compiler#91 (comment)
Would this work for elm-pages?

@dillonkearns
Copy link
Owner

Wow, nice, thanks for that, I didn't see the new comment yesterday.

I'll see if I can fork that and try using that patch.

I'm both using the node-elm-compiler directly, and indirectly through the https://github.com/elm-community/elm-webpack-loader. But I can at least see if we can fix it in that one spot (which would fix the case that you took a screenshot of).

@dillonkearns
Copy link
Owner

It works!

Image 2020-02-08 at 8 56 14 AM

@ad-si
Copy link
Author

ad-si commented Feb 8, 2020

Awesome 👏, thanks!

@dillonkearns
Copy link
Owner

Just published! 😁 https://github.com/dillonkearns/elm-pages/blob/master/CHANGELOG-NPM.md#128---2020-02-08

Note the caveat I mention in the changelog:

Note, this patch still hasn't propogated through to elm-webpack-loader (see elm-community/elm-webpack-loader#166).
So there may still be non-colorized output for errors as you make changes while the dev server is running.

Hopefully this gets fixed upstream in node-elm-compiler and then elm-webpack-loader updates to pull in that change so we can get colorized output at that stage as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants