npm install -s nodemcu-tool
"scripts": {
"ls":"node_modules/.bin/nodemcu-tool fsinfo",
"upload-app":"node_modules/.bin/nodemcu-tool upload app/*",
"devices":"node_modules/.bin/node_modules/.bin/nodemcu-tool devices",
"format":"node_modules/.bin/nodemcu-tool mkfs --noninteractive",
"flash-fw":"esptool.py --port /dev/tty.SLAB_USBtoUART write_flash -fm qio 0x00000 firmware/nodemcu-master-10-modules-2017-04-12-15-24-09-float.bin",
"flash-fw-dev":"esptool.py --port /dev/tty.SLAB_USBtoUART write_flash -fm qio 0x00000 firmware/nodemcu-dev-10-modules-2017-04-14-15-13-54-float.bin",
"erease-flash-fw":"esptool.py --port /dev/tty.SLAB_USBtoUART erase_flash",
"pwd": "pwd",
"terminal":"node_modules/.bin/nodemcu-tool terminal",
"terminal-py":"nodemcu-uploader --port /dev/tty.SLAB_USBtoUART terminal"
},
The actual workflow is something like this:
- ensure no (nodemcu) terminal is running; start upload-app via double click in npm window; look for errors
- in (webstorm) terminal window enter npm run terminal-py
- enter there node.restart()
- ctrl+ü ends (nodemcu) terminal; repeat from 1