jeslie0 / mkElmDerivation

A nix flake for simplifiying the packaging of elm projects, inspired by elm2nix.
https://github.com/jeslie0/mkElmDerivation/
MIT License
26 stars 2 forks source link

Default to terser instead of uglifyjs #13

Open pmiddend opened 3 months ago

pmiddend commented 3 months ago

I've just read that uglify-js is actually no longer maintained. However, terser is, and it's recommended by elm-optimize-level-2 as a replacement. Maybe mkElmDerivation should use terser, then? Usage seems exactly the same as uglifyjs.

jeslie0 commented 3 months ago

The reason I used uglify-js was because that is was that is what Evan uses in the minification guide.

I have actually updated the way mkElmDerivation works by default to make it less opinionated. Essentially, all this does now is fetch the elm dependencies and puts them in the right place. It's then up to the user to run whatever elm commands they want to.

I am happy to update to terser if you think that is a good idea, but it will be updating legacy functionality of this repository. Would you benefit from that?

pmiddend commented 3 months ago

Ahhh, I get what you're saying. It seems I'm still using an old version of mkElmDerivation that is more opinionated.

I will update mkElmDerivation then and get back to you.