Hi, thanks for sharing this!
So just so I understand,
espruino-tools/coreruns in the browser and allows you to control a connected Espruino device - but when you connect it's able to query it to see what functionality is available on the device and expose that? That's very cool.
I like the peer.js connection too. So that allows you to use your
espruino-tools/coreAPI, but just remotely?
Having a way to get up and running with a localhost server and
create-espruino-applooks pretty neat too. It feels like sometimes it can be more of a hinderance than a help if it's not well documented, but it looks like you've done an amazing jobs with the docs at https://documentation-xi-liard.vercel.app/ - hopefully we'll see some others getting involved using this :)
Ive been working on a few npm packages and an npx tool to ease the development of espruino devices using typescript.
currently we have
This package is a reimplementation of the espruino-ble-uart package.
So far this package has been edited to have an overall nicer modal and typing made in typescript.
There are plans to revamp this to improve the syntax to conform to more current ecma script standards such as using classes
This package provides all the basic features anybody could want to get started working with an espruino device, with the ability to easily create custom devices and expand functionality.
Some notable features include:
syntax that can be easier understood by beginners such as
other syntax and a getting started guide can be found on the documentation site here
This package utilises peerjs to create easy peer to peer connection between a host computer and a connector computer (such as a mobile), this is especially useful for controlling espruino devices from a mobile device or sending video feeds to determine what an espruino device can do.
This is probably the most exciting addition, this NPX tool allows for espruino development to be started by running a single command
npx create-espruino-app myapp.
This has some benefits:
npm startwithin the directory a development localhost server will be run allowing for easy development.
npm buildthat will compile your project into a single index.html and main.js file allowing for hosting on github pages for free.
This also incorporates some tags:
npx create-espruino-tools appname --template typescript
--clean-installremove any junk ive added to make the landing page more presentable.
--peerinitialise an espruino app with the peer package.
There are plans to improve these packages further, for example:
You can find the code here, dont hesitate to send me a message with any feedback it would be much appreciated.
currently there are no demos but this will change in the future