mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 23:04:52 +09:00
Apply suggestions from code review
- Copy paste errors. - Incorrect capitalisation. - Incorrect exports. - Missed find and replace. Co-authored-by: Hornwitser <github@hornwitser.no>
This commit is contained in:
1 parent
8fbdb5dfab
commit
3423e0a30c
5 files changed
+14
-18
No files matched your search
@@ -14,7 +14,7 @@ module.exports = (env = {}) => merge(common(env), {
|
||||
plugins: [
|
||||
new webpack.container.ModuleFederationPlugin({
|
||||
name: "__plugin_name__",
|
||||
library: { type: "var", name: "plugin___plugin_name__" },
|
||||
library: { type: "window", name: "plugin___plugin_name__" },
|
||||
exposes: {
|
||||
"./": "./index.__ext__",
|
||||
"./package.json": "./package.json",
|
||||
|
||||
@@ -31,12 +31,12 @@ lib.definePermission({
|
||||
//%endif
|
||||
|
||||
const plugin = {
|
||||
name: "// plugin_name //",
|
||||
title: "// plugin_name //",
|
||||
name: "__plugin_name__",
|
||||
title: "__plugin_name__",
|
||||
description: "Example Description. Plugin. Change me in index.js",
|
||||
//%if controller
|
||||
|
||||
controllerEntrypoint: "./dist/node/controller",
|
||||
controllerEntrypoint: "./controller",
|
||||
controllerConfigFields: {
|
||||
"__plugin_name__.myControllerField": {
|
||||
title: "My Controller Field",
|
||||
@@ -48,7 +48,7 @@ const plugin = {
|
||||
//%endif
|
||||
//%if host
|
||||
|
||||
hostEntrypoint: "./dist/node/host",
|
||||
hostEntrypoint: "./host",
|
||||
hostConfigFields: {
|
||||
"__plugin_name__.myHostField": {
|
||||
title: "My Host Field",
|
||||
@@ -60,7 +60,7 @@ const plugin = {
|
||||
//%endif
|
||||
//%if instance
|
||||
|
||||
instanceEntrypoint: "./dist/node/instance",
|
||||
instanceEntrypoint: "./instance",
|
||||
instanceConfigFields: {
|
||||
"__plugin_name__.myInstanceField": {
|
||||
title: "My Instance Field",
|
||||
@@ -72,7 +72,7 @@ const plugin = {
|
||||
//%endif
|
||||
//%if ctl
|
||||
|
||||
ctlEntrypoint: "./dist/node/ctl",
|
||||
ctlEntrypoint: "./ctl",
|
||||
controlConfigFields: {
|
||||
"__plugin_name__.myControlField": {
|
||||
title: "My Control Field",
|
||||
|
||||
@@ -19,7 +19,7 @@ class PluginExampleEvent {
|
||||
"myNumberArray": Type.Array(Type.Number()),
|
||||
});
|
||||
|
||||
static fromJson(json) {
|
||||
static fromJSON(json) {
|
||||
return new PluginExampleEvent(json.myString, json.myNumberArray);
|
||||
}
|
||||
}
|
||||
@@ -41,8 +41,8 @@ class PluginExampleRequest {
|
||||
"myNumberArray": Type.Array(Type.Number()),
|
||||
});
|
||||
|
||||
static fromJson(json) {
|
||||
return new PluginExampleEvent(json.myString, json.myNumberArray);
|
||||
static fromJSON(json) {
|
||||
return new PluginExampleRequest(json.myString, json.myNumberArray);
|
||||
}
|
||||
|
||||
static Response = plainJson(Type.Object({
|
||||
|
||||
@@ -37,7 +37,7 @@ function MyTemplatePage() {
|
||||
</PageLayout>;
|
||||
}
|
||||
|
||||
class WebPlugin extends BaseWebPlugin {
|
||||
export class WebPlugin extends BaseWebPlugin {
|
||||
//%if controller & web // Subscribing requires web content and the controller
|
||||
subscribableData = new lib.EventSubscriber(ExampleSubscribableUpdate, this.control);
|
||||
|
||||
@@ -76,7 +76,3 @@ class WebPlugin extends BaseWebPlugin {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
WebPlugin,
|
||||
};
|
||||
@@ -20,7 +20,7 @@ export class PluginExampleEvent {
|
||||
"myNumberArray": Type.Array(Type.Number()),
|
||||
});
|
||||
|
||||
static fromJson(json: Static<typeof PluginExampleEvent.jsonSchema>) {
|
||||
static fromJSON(json: Static<typeof PluginExampleEvent.jsonSchema>) {
|
||||
return new PluginExampleEvent(json.myString, json.myNumberArray);
|
||||
}
|
||||
}
|
||||
@@ -44,8 +44,8 @@ export class PluginExampleRequest {
|
||||
"myNumberArray": Type.Array(Type.Number()),
|
||||
});
|
||||
|
||||
static fromJson(json: Static<typeof PluginExampleEvent.jsonSchema>) {
|
||||
return new PluginExampleEvent(json.myString, json.myNumberArray);
|
||||
static fromJSON(json: Static<typeof PluginExampleRequest.jsonSchema>) {
|
||||
return new PluginExampleRequest(json.myString, json.myNumberArray);
|
||||
}
|
||||
|
||||
static Response = plainJson(Type.Object({
|
||||
|
||||
Reference in new issue
Block a user