-
Notifications
You must be signed in to change notification settings - Fork 1
Creating a Widget
Gabriel Enrico edited this page Mar 18, 2021
·
4 revisions
Differently from the Widget Guide, this is not to be a creation guide, but will rather show how to do DropMeter-specific stuff, such as Receiving Plugin messages; What to do and NOT to do; and Packaging.
Note that all JS on this guide will be using the ES6 Import/TypeScript Syntax
-
Install the Widget SDK from npm
-
Import the types from the Widget SDK:
import { DropMeter, PluginMessage } from "./DropMeter";
- Register your Plugin Message Handler (One for each plugin you are using):
(await DropMeter()).registerCallback(pluginId, (data: PluginMessage<MES, RET>)=> {
console.log(data.messageID, data.data)
})
SDK Version Range | Manifest Documentation | Final File Extension |
---|---|---|
1.0.0 -> Present | The Universal Manifest | .dmx |
-
Write a JSON Manifest File, named
manifest.json
. Documentation is available on the table above. If your build runner supports it set it to be copied to your build output.- Don't forget to run a build after doing it, to copy the file.
-
Zip your build output. NOTE: make sure your files are at the root of the zip file. The final structure should look like:
- MyPlugin.zip/manifest.json
- MyPlugin.zip/index.html
- MyPlugin.zip/{anyOtherFiles}
-
Rename your ZIP file to have the Final File Extension, shown in the table above.