You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ./config/config.default.js should contain the documentation as well as the default values.
Suggestion is to augment the json structure with metadata such as doc, type, category, value etc. When requiring the file as a config - the structure should be transformed back into the regular config format.
Depending on the category the config variables would be listed from "default", "advanced", "cli".
Example of how the format could look like:
config = {
addOn: {
doc: "AddOn are stateful server workers listening in on changes made to a branch",
type: "container",
category: "default",
enable: {
doc: "If true enables add-ons",
value: false
},
monitorTimeout: {
category: "advanced",
doc: "In milliseconds, the waiting time before add-ons are stopped after no activity (new clients joined or hash updates) in the branch.",
displayValue: '2 * 60 * 1000',
value: 2 * 60 * 1000,
},
workerUrl: {
category: "advanced",
doc: "If given the webgme server will not spawn a child process for running add-ons and instead post the related events to the url. Use addon_handler.js for a machine handling such requests.",
value: null
},
basePaths: {
category: "cli",
doc: "Array of paths to custom add-ons. If you have an add-on at `C:/SomeAddOns/MyAddOn/MyAddOn.js` the path to append would be `C:/SomeAddOns` or a relative path (from the current working directory). N.B. this will also expose any other add-on in that directory, e.g. `C:/SomeAddOns/MyOtherAddOn/MyOtherAddOn.js`.",
type: "array",
displayValue: "[path.join(__dirname, '../src/addon/core')]",
value: [path.join(__dirname, '../src/addon/core')]
}
},
...
The text was updated successfully, but these errors were encountered:
No but that’s a good point. I’m just adding the requirements I had in mind here to open up a discussion about it.
Yes it should generate the docs. Probably also add a test that checks that the docs are in sync with the latest config file.
Any suggestions are welcomed.
The
./config/config.default.js
should contain the documentation as well as the default values.Suggestion is to augment the json structure with metadata such as
doc
,type
,category
,value
etc. When requiring the file as a config - the structure should be transformed back into the regular config format.Depending on the category the config variables would be listed from "default", "advanced", "cli".
Example of how the format could look like:
The text was updated successfully, but these errors were encountered: