File watcher to speed up development! #12785
Replies: 2 comments 4 replies
-
@ldiebold I have seen a few other things like this, but FYI have you seen Also, speaking of |
Beta Was this translation helpful? Give feedback.
-
|
Interesting, and very neat. The pattern I've been using is $ mpremote mount . exec "import app; app.run()"I guess the beauty of |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all!
I wrote some typescript code that creates a "watcher" for micropython (only tested on linux).
Anything changes to files within
./srcare automatically sent to the device.There's a few caveats. For example, you'll likely want to upload all files to begin with as there's no "initial sync" script yet, and it won't work while running a repl (due to how micropython/mpremote work). We could definitely extend this to work around those problems though!
To run it, you'll also need a
package.jsonand to install the dependencies (npm, pnpm, yarn, bun etc)package.json{ "name": "file-watcher", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "dev": "bun ./watch.ts" }, "keywords": [], "author": "Luke Diebold", "license": "ISC", "dependencies": { "@types/node": "^20.8.7", "chokidar": "^3.5.3", "readline": "^1.3.0" }, "devDependencies": { "bun": "^1.0.7" } }Does something like this exist? If not... any thoughts on if this is worth developing furthur (deleting files, renaming folders etc)?
Beta Was this translation helpful? Give feedback.
All reactions