Skip to content

Commit

Permalink
* Added code to handle Settings
Browse files Browse the repository at this point in the history
* Added espruinotools.js for pretokenisation
  • Loading branch information
gfwilliams committed Apr 29, 2020
1 parent b7e4476 commit 0c08e16
Show file tree
Hide file tree
Showing 5 changed files with 525 additions and 26,970 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ Changed for individual apps are listed in `apps/appname/ChangeLog`
* Add `Favourite` functionality
* Version number now clickable even when you're at the latest version (fix #291)
* Rewrite 'getInstalledApps' to minimize RAM usage
* Added code to handle Settings
* Added espruinotools.js for pretokenisation
8 changes: 8 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@ <h3>Utilities</h3>
<button class="btn" id="removeall">Remove all Apps</button>
<button class="btn" id="installdefault">Install default apps</button>
<button class="btn" id="installfavourite">Install favourite apps</button></p>
<h3>Settings</h3>
<div class="form-group">
<label class="form-switch">
<input type="checkbox" id="settings-pretokenise">
<i class="form-icon"></i> Pretokenise apps before upload (smaller, faster apps)
</label>
<button class="btn" id="defaultsettings">Default settings</button>
</div>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion js/appinfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var AppInfo = {
if (storageFile.url.endsWith(".js") && !storageFile.url.endsWith(".min.js")) { // if original file ends in '.js'...
return Espruino.transform(content, {
SET_TIME_ON_WRITE : false,
PRETOKENISE : true,
PRETOKENISE : SETTINGS.pretokenise,
//MINIFICATION_LEVEL : "ESPRIMA", // disable due to https://github.com/espruino/BangleApps/pull/355#issuecomment-620124162
builtinModules : "Flash,Storage,heatshrink,tensorflow,locale"
});
Expand Down
Loading

0 comments on commit 0c08e16

Please sign in to comment.