Skip to content

Commit dc682af

Browse files
committed
Ensure pretokenisation actually works again, fix espruino/EspruinoTools#177
1 parent 1deedec commit dc682af

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

js/appinfo.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ function parseJS(storageFile, options, app) {
138138
minify = false;
139139
}
140140
// TODO: we could look at installed app files and add any modules defined in those?
141-
/* Don't run code that we're going to be uploading direct through EspruinoTools. This is
141+
/* Don't run code that we're going to be uploading direct through EspruinoTools. This is
142142
usually an icon, and we don't want it pretokenised, minifying won't do anything, and really
143143
we don't want anything touching it at all. */
144144
if (storageFile.evaluate) {
@@ -147,6 +147,7 @@ function parseJS(storageFile, options, app) {
147147
}
148148
// Now run through EspruinoTools for pretokenising/compiling/modules/etc
149149
return Espruino.transform(js, {
150+
SAVE_ON_SEND : -1, // ensure EspruinoTools doesn't try and wrap this is write commands, also stops pretokenise from assuming we're writing to RAM
150151
SET_TIME_ON_WRITE : false,
151152
PRETOKENISE : options.settings.pretokenise,
152153
MODULE_URL : localModulesURL+"|https://www.espruino.com/modules",

0 commit comments

Comments
 (0)