index.js

1const { hello } = require('./utils');
2
3const examplePlugin = {
4	name: 'example',
5	version: '1.0.0',
6	description: 'An example plugin for Snap-CLI',
7
8	commands: [
9    {
10      name: 'hello',
11      description: 'Say hello from the example plugin',
12      alias: 'h',
13      options: [
14        {
15          flags: '-n, --name <name>',
16          description: 'Name to say hello to',
17          defaultValue: 'World'
18        }
19      ],
20			action: async (options) => {
21				hello(options);
22			},
23		},
24  ]
25};
26
27module.exports = examplePlugin;
28