I've got my project setup with a number of separate modules, is it possible to write this to the pixl using the command line tool?
Should be, yes. I believe it looks in a 'modules' directory for any modules.
$ cat modules/bar.js
exports = 42;
$ cat foo.js
var a = require("bar");
$ espruino -d Pixl foo.js
# writes it to RAM
$ espruino -d Pixl --minify foo.js
# writes it to RAM with minification
$ espruino -d Pixl --minify --config MODULE_AS_FUNCTION=true --config SAVE_ON_SEND=1 foo.js
# writes to flash with minified code
You may also have some success with --config PRETOKENISE=true, which will pretokenise code before upload, saving a bit of flash
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem