New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

espruino

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

espruino - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

README.md~

2

package.json
{
"name": "espruino",
"version": "0.0.7",
"version": "0.0.8",
"description": "Command Line Interface and library for Communications with Espruino JavaScript Microcontrollers",

@@ -5,0 +5,0 @@ "main": "index.js",

Espruino Tools
=============
==============
This repository contains a set of tools for the [Espruino JavaScript Interpreter](http://www.espruino.com). Mainly, it is used by the [Espruino Web IDE](http://www.github.com/espruino/EspruinoWebIDE) although hopefully it is portable enough to be used by other tools such as command-line interfaces.
This repository contains a set of tools for the [Espruino JavaScript Interpreter](http://www.espruino.com).
While it is used directly by the [Espruino Web IDE](http://www.github.com/espruino/EspruinoWebIDE), there's are also simple command-lune and `node.js` interfaces.
Command-line

@@ -34,2 +37,11 @@ ------------

espruino -p /dev/ttyACM0 myprogram.js
# Load a file into two Espruino boards
espruino -p /dev/ttyACM1 /dev/ttyACM2 mycode.js
# Load a file into Espruino and save
espruino -p /dev/ttyACM0 mycode.js -e "save()"
# Execute a single command on the default serial device
espruino -e "digitalWrite(LED1,1);"
```

@@ -41,5 +53,5 @@

This is the NPM module [`espruino`](https://www.npmjs.com/package/espruino)
This is the NPM module [`espruino`](https://www.npmjs.com/package/espruino).
It contains the following functions:
Once installed with `npm install -g espruino` it contains the following functions:

@@ -72,5 +84,6 @@ ```

**Note:** this module is currently a bit noisy - it prints a lot of debug
**Note:** this module is currently prints a lot of debug
information to `console.log` when working.
Internals

@@ -81,5 +94,6 @@ ---------

* You have a bunch of source files that are automatically run
* You have a bunch of source files that are automatically loaded by `index.js`
* These add things to `Espruino.Core` or `Espruino.Plugins`
* You then call into those to do what you want
* They also register themselves as `processors` with `Espruino.addProcessor`. For instance you might register for `"transformForEspruino"` in which case you can do something to the JS code before it's finally sent to Espruino.
* You then call into `Espruino.Core.X` or `Espruino.Plugins.Y` to do what you want

@@ -123,2 +137,3 @@ It's not ideal for node.js, but was designed to run in the Web browser for the [Espruino Web IDE](http://www.github.com/espruino/EspruinoWebIDE)

* Core functionality goes in `core`, Plugins go in `plugins`. See `plugins/_examplePlugin.js` for an example layout
* Serial port handlers are a special case - they just add themselves to the `Espruino.Core.Serial.devices` array when loaded.
* Plugins/core need to implement in init function, which is called when the document (and settings) have loaded.

@@ -128,1 +143,15 @@ * Plugins can respond to specific events using `Espruino.addProcessor`. For instance you can use `Espruino.addProcessor("transformForEspruino", function (data,callback) { .. })` and can modify code before it is sent to Espruino. Events types are documented at the top of `espruino.js`

RELATED
-------
There are other tools available to program Espruino:
* (Recommended) The [Espruino Web IDE](http://www.github.com/espruino/EspruinoWebIDE) (Google Chrome)
* [Online version of the Web IDE](http://espruino.github.io/EspruinoWebIDE/) (any browser - limited to serial over audio or Web Bluetooth)
* [espruino-cli](https://www.npmjs.org/package/espruino-cli) (node.js)
* [node-espruino](https://www.npmjs.com/package/node-espruino) (node.js)
* [grunt-espruino](https://www.npmjs.com/package/grunt-espruino) (node.js)
* [espruino](https://github.com/olliephillips/espruingo) (Go)
*Note:* while other tools exist, this EspruinoTools module and the Web IDE which uses it are maintained alongside the Espruino firmware, and tend to have support for various features and edge cases that other tools might not.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc