grunt-espruino
Deploy code to an espruino microcontroller as part of a grunt setup.
Getting Started
This plugin requires Grunt ~0.4.0
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-espruino --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt;
Espruino task
Run this task with the grunt espruino
command.
Settings
There are a number of options available. Either boardSerial
or port
must be supplied, as well as file
:
boardSerial
Type: String
This defines the manufacturer serial number of the board that we are deploying to. Can be pulled from the board over serial using getSerial()
function.
port
Type: String
This defines the serial port that you want to deploy to. Not as fancy as using boardSerial
but it works.
file
Type: String
Path to the file that you want deployed.
listen
Type: Boolean
Whether to leave the serial connection open after deploy and listen.
watch
Type: Boolean
If true watches file
for any changes and redeploys.
save
Type: Boolean
If true uploaded code is saved to the espruinos flash. Set to false when in development for much shorter deploy times.
Examples
// Simple config to deploy to a single boardgruntmodule { grunt; grunt; grunt;}
// Development config, doesnt save so that deploys are faster. Watches for any changes and redeploys.gruntmodule { grunt; grunt; grunt;}