@allObjects Thank you, here I could achieve the solution:
# create bundle BUNDLE="init.min.js" echo "" > ${BUNDLE} # Register modules via `Modules.addCached()` method # see: http://forum.espruino.com/comments/12899741/ MODULE_NAME="FlashEEPROM" MODULE_STR=$(uglifyjs -c -m -- ${MODULE_NAME}.js | sed 's/\"/\\\"/g' | sed "s/\n//g") echo "Modules.addCached(\"${MODULE_NAME}\", \"${MODULE_STR}\");" >> ${BUNDLE} uglifyjs -c -m -- init.js >> ${BUNDLE}
Now I can require("FlashEEPROM") as expected.
require("FlashEEPROM")
@ceremcem started
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.
@allObjects Thank you, here I could achieve the solution:
Now I can
require("FlashEEPROM")
as expected.