sla-wizard-plugin-hello
v1.0.1
Published
Example plugin fro sla-wizard that adds 'hello' command.
Readme
sla-wizard-plugin-hello
Example plugin for sla-wizard that adds a hello command.
This plugin demonstrates how to extend sla-wizard by registering a custom command that greets the user.
It can be used as a base for building your own plugins.
Installation
npm install sla-wizard-plugin-helloUsage
After installing, the plugin will add the hello command to sla-wizard.
sla-wizard helloThis will give the following output:
Hello, world! 👋--name option
You can pass a custom name:
sla-wizard hello --name DaniThis will give the following output:
Hello, Dani! 👋Additional configuration (custom greeting)
The plugin also supports a greeting configuration in your sla-wizard config file. The config file must be named sla-wizard.config.json and it has this structure:
{
"plugins": [
{
"name": "sla-wizard-plugin-hello",
"config": {
"greeting": "Ho la"
}
}
]
}NOTE: You can create plugins with no config options.
Now running:
sla-wizard hello --name DaniWill give the following output:
Ho la, Dani! 👋Specs
Command: hello
Description: Prints a friendly greeting.
Options:
- --name
<name>→ Name to greet. Defaults toworld.
- --name
Config:
- greeting (string) → Custom greeting text. Defaults to
Hello.
- greeting (string) → Custom greeting text. Defaults to
Contributing
Feel free to fork this repo and adapt it for your own sla-wizard plugins. Issues and PRs are welcome!
