1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
node-red/test/resources/plugin/test-plugin/test.js
2021-01-18 16:25:40 +00:00

13 lines
406 B
JavaScript

module.exports = function(RED) {
console.log("Loaded test-plugin/test")
RED.plugins.registerPlugin("my-test-plugin", {
type: "foo",
onadd: function() {
console.log("my-test-plugin.onadd called")
RED.events.on("registry:plugin-added", function(id) {
console.log(`my-test-plugin: plugin-added event "${id}"`)
});
}
})
}