mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
1. Add "Back"-Button on list selection submenu inside E_showMenu 2. Regenerated E_showMenu_Q3.min.js via IDE with "Closure Simple Optimizations" 3. Add ChangeLog entry 4. Readd ChangeLog entry for #2186
Built-in JS modules
Simply stick the JS modules you want in this directory,
then modify the boards/BOARDNAME.py file so it includes
a line that sets JSMODULESOURCES:
info = {
....
'build' : {
....
'makefile' : [
....
'JSMODULESOURCES+=libs/js/YOUR_MODULE.min.js',
]
}
};
or add them as prefix to make
JSMODULESOURCES=libs/js/YOUR_MODULE.min.js make
Then when you rebuild, require("YOUR_MODULE") will
magically pull in your module.
Notes
- Until referenced, modules use NO RAM
- Once referenced, the JS code in a module will be executed (from Flash).
- Every function declared in the module's root scope will take up some RAM
- However the code inside that function will be kept in Flash memory, so won't take up RAM.