forked from emacs-eask/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheask
executable file
·131 lines (124 loc) · 3.14 KB
/
eask
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#!/usr/bin/env node
const env = require('./src/env');
const yargs = require('yargs');
const usage = `eask is the main command, used to manage your Emacs dependencies
Eask is a command-line tool that helps you build, lint, and test Emacs Lisp packages.
Usage: eask <command> [options..]`;
const epilogue = `For more information, find the manual at https://emacs-eask.github.io/`;
const version = `0.10.2`;
yargs
.usage(usage)
.scriptName('')
.epilogue(epilogue)
.commandDir('cmds/core/')
.commandDir('cmds/util/')
.command({
command: '*',
handler() { yargs.showHelp(); }
})
.version('version', 'output version information and exit', version)
.help('help', 'show usage instructions')
.showHidden('show-hidden', 'Show hidden commands and options')
.options({
'global': {
description: `change default workspace to ~/.eask/`,
alias: 'g',
type: 'boolean',
},
'config': {
description: `change default workspace to ~/.emacs.d/`,
alias: 'c',
type: 'boolean',
},
'all': {
description: `enable all flag`,
alias: 'a',
type: 'boolean',
},
'quick': {
description: `start cleanly without loading the configuration files`,
alias: 'q',
type: 'boolean',
},
'force': {
description: `enable force flag`,
alias: 'f',
type: 'boolean',
},
'debug': {
description: `turn on debug mode`,
type: 'boolean',
},
'strict': {
description: `report error instead of warnings`,
type: 'boolean',
},
'allow-error': {
description: `attempt to continue execution on error`,
type: 'boolean',
},
'insecure': {
description: `allow insecure connection`,
type: 'boolean',
},
'timestamps': {
description: `log with timestamps`,
type: 'boolean',
hidden: true,
},
'log-level': {
description: `log with level`,
type: 'boolean',
hidden: true,
},
'log-file': {
description: `generate log files`,
alias: 'lf',
type: 'boolean',
hidden: true,
},
'elapsed-time': {
description: `show elapsed time between each operation`,
alias: 'et',
type: 'boolean',
hidden: true,
},
'no-color': {
description: 'enable/disable color output',
type: 'boolean',
},
'verbose': {
description: `set verbosity from 0 to 5`,
alias: 'v',
requiresArg: true,
type: 'number',
},
})
.options({
'proxy': {
description: `update proxy for HTTP and HTTPS to host`,
type: 'string',
group: TITLE_PROXY_OPTION,
},
'http-proxy': {
description: `update proxy for HTTP to host`,
type: 'string',
group: TITLE_PROXY_OPTION,
},
'https-proxy': {
description: `update proxy for HTTPS to host`,
type: 'string',
group: TITLE_PROXY_OPTION,
},
'no-proxy': {
description: `set no-proxy to host`,
type: 'string',
group: TITLE_PROXY_OPTION,
},
})
.parserConfiguration({ "boolean-negation": false })
.strict()
.demandCommand()
.showHelpOnFail(true)
.wrap(yargs.terminalWidth())
.argv;