-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
executable file
·41 lines (39 loc) · 1.1 KB
/
index.js
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
#!/usr/bin / env node
const figlet = require( 'figlet' );
const chalk = require ('chalk');
const { hideBin } = require('yargs/helpers')
require('yargs/yargs')(hideBin(process.argv))
.scriptName("csj")
.commandDir('cmds', { recurse : true })
.usage(
chalk.bold( chalk.cyan(figlet.textSync('... CS-JRT ...', {})))
+ '\n'
+ chalk.bold(chalk.yellow(' ClickSend Jira Reporting Tool.') )
+ '\n'
+ '\n'
+ chalk.bold( 'Usage: $0 <command> [options]'
))
.demandCommand()
.option( 'host', {
alias : 'h',
describe : 'Your Atlassian host (e.g. clicksend.atlassian.net)',
requiresArg : true,
demandOption : true,
group : 'Jira Connect Options:'
})
.option( 'basic', {
alias : 'b',
describe : 'The basic authentication string for Atlassian.',
requiresArg : true,
demandOption : true,
group : 'Jira Connect Options:'
})
.option( 'dir', {
alias : 'd',
describe : 'The directory into which the report(s) is/are written',
requiresArg : true,
normalize : true,
default : './'
})
.help()
.parse()