You are reading a single comment by @Moray and its replies. Click here to read the full conversation.
  • @allObjects it's pretty straightforward. The basic rule is refer to anything you don't want minified as an indirect property reference, so me.property should be written as me['property']. After minification is applied, this goes back to me.property, so although the unoptimised code looks more prolix, the minified is fine. The main problem seems to me that someone later will "improve" the unminified code so that it stops working with advanced optimisation. I looked at using the exports and externs options in advanced optimisation https://developers.google.com/closure/compiler/docs/api-tutorial3?hl=en but they don't work well for the Espruino use case as is. Externs could work with some changes to WebIDE perhaps.

About

Avatar for Moray @Moray started