-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli.js
More file actions
45 lines (41 loc) · 1.11 KB
/
Copy pathcli.js
File metadata and controls
45 lines (41 loc) · 1.11 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
43
44
45
const meow = require('meow');
const chalk = require('chalk');
const Table = require('cli-table3');
const green = chalk.green;
const yellow = chalk.yellow;
const cyan = chalk.cyan;
const blue = chalk.blue;
const table = new Table({
head: [green('Command'), green('Language'), green('Since'), green('SpokenLanguage')]
})
table.push(
['github-trend-cli', 'JavaScript', 'daily', 'en'],
['github-trend-cli', 'JavaScript', 'weekly', 'any'],
['github-trend-cli', 'any', 'daily', 'monthly'],
)
module.exports = meow(
`
Usage
${green(`github-trend-cli`)} ${cyan(`<language>`)} ${blue(`<since>`)} ${yellow(`<spokenLanguage>`)}
Commands
${cyan(`language`)} Language of repo (Java, JavaScript, Python, ...)
${cyan(`since`)} Daily, Weekly or Monthly
${cyan(`spokenLanguage`)} Spoken Language (en, fr, ...)
Additional Commands
${green('github-trend-cli')} ${cyan('help')}
Examples
${table.toString()}
`,
{
booleanDefault: undefined,
hardRejection: false,
inferType: false,
flags: {
all: {
type: 'boolean',
default: false,
alias: 'a'
}
}
}
);