mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 23:14:53 +09:00
Move export for plugin declaration (#555)
Change the expected exported name of plugin declarations to be "plugin" at the main entrypoint instead of the default export. This makes the plugin's code organisation more flexible especially when using CommonJS JavaScript modules as they can export additional symbols from the plugin declaration file.
This commit is contained in:
1 parent
8884116ee9
commit
b0f6c95fca
33 files changed
+71
-62
No files matched your search
@@ -13,8 +13,8 @@ import type HostConnection from "./HostConnection";
|
||||
* Controller plugins are subclasses of this class which get instantiated by
|
||||
* the controller on startup when the plugin is enabled in the config.
|
||||
* To be discovered the class must be exported under the name `ControllerPlugin`
|
||||
* in the module specified by the `controllerEntrypoint` in the plugin's info.js
|
||||
* file.
|
||||
* in the module specified by the `controllerEntrypoint` in the plugin's
|
||||
* `plugin` export.
|
||||
*/
|
||||
export default class BaseControllerPlugin {
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user