mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-11 16:20:13 +00:00
Add "data-based" command doc framework basics
This commit is contained in:
parent
cca287d3e3
commit
321f4d7d25
10 changed files with 166 additions and 5 deletions
4
docs/commands/README.md
Normal file
4
docs/commands/README.md
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# Command documentation (experimental)
|
||||
Command documentation is defined in `commands.js`. `build.js` can export a JSON file consumed by other tools (hopefully?).
|
||||
|
||||
This documentation is loaded by the `CommandInfo` Vue component, used in `commands.md` for the command page (and maybe other places soon?).
|
||||
1
docs/commands/build.js
Normal file
1
docs/commands/build.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
console.log(JSON.stringify(require("./commands")));
|
||||
24
docs/commands/commands.js
Normal file
24
docs/commands/commands.js
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
module.exports = {
|
||||
"system-new": {
|
||||
title: "Create a new system",
|
||||
summary: "Creates a new system if you do not already have one.",
|
||||
usage: [
|
||||
{cmd: "system new", desc: "Creates a system with no name."},
|
||||
{cmd: "system new `system-name`", desc: "Creates a named system."}
|
||||
],
|
||||
arguments: {
|
||||
"system-name": {type: "string", desc: "the name of the system to create", optional: true}
|
||||
}
|
||||
},
|
||||
"system-info": {
|
||||
title: "Look up info about a system",
|
||||
summary: "Shows a system card, either your own or someone else's.",
|
||||
usage: [
|
||||
{cmd: "system", desc: "Looks up your own system."},
|
||||
{cmd: "system `target`", desc: "Looks up another system."}
|
||||
],
|
||||
arguments: {
|
||||
"target": {type: "system", desc: "the system to look up"}
|
||||
}
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue