Hmm, ok. Maybe start a new thread for minifier problems?
Imageclock references things that have been renamed by the minifier.
I think there are 3 options?
ensure they were global
save your file as app.min.js in BangleApps even though it's not minified, and then the minifier won't touch it (I think)
In custom.html, merge all of imageclock.draw.js into imageclock.app.js - and then it'll all get minified together and should end up faster.
for (let a of a.getPoints())
It looks like a minifier bug? a = [3,4,5]; for (let a of a) console.log(a); fails in Node.js too so it's not a problem with Espruino not being spec compliant.
the minifier generated a constant named g into a block of code calling Bangle.load which in turn calls g.reset()
That feels like another minifier bug?
I'd be interested to know what speed improvements you're seeing, because if it's not that much I wonder whether we should just consider not using minification.
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.
Hmm, ok. Maybe start a new thread for minifier problems?
I think there are 3 options?
app.min.js
in BangleApps even though it's not minified, and then the minifier won't touch it (I think)custom.html
, merge all ofimageclock.draw.js
intoimageclock.app.js
- and then it'll all get minified together and should end up faster.It looks like a minifier bug?
a = [3,4,5]; for (let a of a) console.log(a);
fails in Node.js too so it's not a problem with Espruino not being spec compliant.That feels like another minifier bug?
I'd be interested to know what speed improvements you're seeing, because if it's not that much I wonder whether we should just consider not using minification.