I'm not talking about extending Espruino at all here... I can want a way to tell someone else's minifier that a value isn't going to change.
I guess I could pre-parse the code, detect the pattern var DBG = true/false; at the beginning, and then search/replace DBG with the actual value before passing the code to the minifier. It's pretty ugly though.
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'm not talking about extending Espruino at all here... I can want a way to tell someone else's minifier that a value isn't going to change.
I guess I could pre-parse the code, detect the pattern
var DBG = true/false;
at the beginning, and then search/replaceDBG
with the actual value before passing the code to the minifier. It's pretty ugly though.