mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 07:33:12 +09:00
Addressed remaining review comments
This commit is contained in:
6 files changed
+33
-5
No files matched your search
@@ -90,7 +90,14 @@ const plugin = {
|
||||
Messages.ExampleSubscribableUpdate,
|
||||
//%endif
|
||||
],
|
||||
//%if controller | web // The controller always includes web entry even if there is no content
|
||||
//%if web // Web content template has an example route which is the plugin name
|
||||
|
||||
webEntrypoint: "./web",
|
||||
routes: [
|
||||
"/__plugin_name__",
|
||||
],
|
||||
//%endif
|
||||
//%if controller & !web // The controller always includes web entry even if there is no content
|
||||
|
||||
webEntrypoint: "./web",
|
||||
routes: [],
|
||||
|
||||
@@ -8,7 +8,7 @@ class InstancePlugin extends BaseInstancePlugin {
|
||||
this.instance.handle(PluginExampleEvent, this.handlePluginExampleEvent.bind(this));
|
||||
this.instance.handle(PluginExampleRequest, this.handlePluginExampleRequest.bind(this));
|
||||
//%if module
|
||||
this.instance.server.handle("ipc-__plugin_name__-plugin_example_ipc", this.handlePluginExampleIPC.bind(this));
|
||||
this.instance.server.handle("__plugin_name__-plugin_example_ipc", this.handlePluginExampleIPC.bind(this));
|
||||
//%endif
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,14 @@ export const plugin: lib.PluginDeclaration = {
|
||||
Messages.ExampleSubscribableUpdate,
|
||||
//%endif
|
||||
],
|
||||
//%if controller | web // The controller always includes web entry even if there is no content
|
||||
//%if web // Web content template has an example route which is the plugin name
|
||||
|
||||
webEntrypoint: "./web",
|
||||
routes: [
|
||||
"/__plugin_name__",
|
||||
],
|
||||
//%endif
|
||||
//%if controller & !web // The controller always includes web entry even if there is no content
|
||||
|
||||
webEntrypoint: "./web",
|
||||
routes: [],
|
||||
|
||||
@@ -14,7 +14,7 @@ export class InstancePlugin extends BaseInstancePlugin {
|
||||
this.instance.handle(PluginExampleEvent, this.handlePluginExampleEvent.bind(this));
|
||||
this.instance.handle(PluginExampleRequest, this.handlePluginExampleRequest.bind(this));
|
||||
//%if module
|
||||
this.instance.server.handle("ipc-__plugin_name__-plugin_example_ipc", this.handlePluginExampleIPC.bind(this));
|
||||
this.instance.server.handle("__plugin_name__-plugin_example_ipc", this.handlePluginExampleIPC.bind(this));
|
||||
//%endif
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user