If you type save() on the left-hand side of the IDE after your code is uploaded, the contents of Espruino's RAM at that point will be compressed and written in to flash memory.
...
However, this means that any code that was executed at upload time will not be re-executed. For instance you may have some external hardware like an LCD display connected to Espruino - after applying power, the LCD will need to be initialised (since it can not remember its state)....
All you need to do is choose to save to Flash, not RAM in the IDE (or you can use an onInit() function as that link describes).
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.
Ok, just got your response - so ignore what I just wrote.
You've hit this: http://www.espruino.com/Saving
All you need to do is choose to save to
Flash
, notRAM
in the IDE (or you can use anonInit()
function as that link describes).