-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli.js
More file actions
42 lines (40 loc) · 1.15 KB
/
Copy pathcli.js
File metadata and controls
42 lines (40 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const meow = require('meow');
const chalk = require('chalk');
const green = chalk.green;
const yellow = chalk.yellow;
const cyan = chalk.cyan;
const Table = require('cli-table3')
const table = new Table({
head: [green('Command'), green('Type'), green('Name'), green('Description')]
})
table.push(
['gen-files', 'schema', 'badge', 'Creates GraphQL file graphl-schema with the name badge'],
['gen-files', 'vuex-store', 'badge', 'Creates Vuex file store with the name badge'],
['gen-files', 'vue-component', 'badge', 'Creates Vue component file with the name badge'],
['gen-files', 'chai', 'badge', 'Creates Chai file with the name badge'],
)
module.exports = meow(
`
Usage
${green(`gen-files`)} ${cyan(`<type>`)} ${yellow(`<name>`)}
Commands
${cyan(`type`)} Type of file that you want to gen (schema, vuex-store, ...)
${cyan(`name`)} Name of schema to generate
Additional Commands
${green('gen-files')} ${cyan('help')}
Examples
${table.toString()}
`,
{
booleanDefault: undefined,
hardRejection: false,
inferType: false,
flags: {
all: {
type: 'boolean',
default: false,
alias: 'a'
}
}
}
);