I use the closure compiler service because that's what I use for the modules (and it does a good job, including constant folding). Hence, if you make a module, minify it and it works, you can be sure that if you send a pull request with it, it'll still work.
I've never hit any issues with it (and with restrictions on its use) - but then when you're minifying each time you send to Espruino I guess you use it an order of magnitude more.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I use the closure compiler service because that's what I use for the modules (and it does a good job, including constant folding). Hence, if you make a module, minify it and it works, you can be sure that if you send a pull request with it, it'll still work.
I've never hit any issues with it (and with restrictions on its use) - but then when you're minifying each time you send to Espruino I guess you use it an order of magnitude more.
The code for the specific bit of the Web IDE is here: https://github.com/espruino/EspruinoWebIDE/blob/master/js/plugins/minify.js
Pull requests welcome if someone wants to include an offline minifier :)
It may be non-trivial with some minifiers though as you can't use
eval
from within a Chrome Web App - and some of them rely on it.