Best practices for testing plugins locally during Matterbridge development? #2
Replies: 3 comments
-
|
Hi, I can tell you how I work here: Outside the container on your host you should have an instance of matterbridge that you can use to add your plugin under development (once again matterbridge -add . from the plugin root directory or update the path accordingly if are in a different directory). In this way you have an instance of matterbridge (this one can be paired) with added your local plugin under development. Whenever you change the code in your plugin under development, just shutdown matterbridge, start it again and it will load the updated code. This is also the approach to use in production if you are not ready to publish on npm. Plugins can run from local folders too. |
Beta Was this translation helpful? Give feedback.
-
|
If you don't want or cannot have an instance of matterbridge on the host machine,
|
Beta Was this translation helpful? Give feedback.
-
|
There is also a third option I use daily to test in a fully confined container environment on wsl 2, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @Luligu !
First of all, thank you for building and maintaining Matterbridge, it’s an awesome project!
I’m currently working on a YouTube video that walks through how to create a Matterbridge plugin, and I’m using the plugin template to illustrate the process.
Here’s what I’ve done so far:
npm run matterbridge:addand successfully saw my plugin and its test device appear in the Matterbridge UI.Now I’d love to test the behavior of my device.
Since Matterbridge runs in a devcontainer, I can’t directly pair it from an external controller. What’s your usual development workflow to test plugins in this case?
Do you have a recommended approach to quickly iterate and test without needing to publish the plugin or deploy it in a full setup every time?
Really appreciate any tips, and thanks again for your great work on this project!
Best,
Pierre-Gilles (Gladys Assistant)
Beta Was this translation helpful? Give feedback.
All reactions