-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
executable file
·34 lines (26 loc) · 1000 Bytes
/
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
#!/usr/bin/env node
/* eslint-disable global-require,spaced-comment,no-unused-expressions,max-len */
/*************************
* REQUIRE LIBS *
************************/
const _ = require('lodash');
const yargs = require('yargs');
// noinspection BadExpressionStatementJS
/*************************
* PROCESS ARGUMENTS *
************************/
yargs
.usage('usage: sneacret <command>')
.command(require('./src/commands/alphabet'))
.command(require('./src/commands/hide'))
.command(require('./src/commands/show'))
// Hidden
.command(require('./src/commands/test'))
// To check that Gut is installed or just mess around
.command('groot', 'Display a random sentence, in French', () => process.stdout.write('Je s\'appelle Groot\n'))
.demandCommand(1, 'Specify the command you want to run!'.red)
.help()
.version()
.wrap(null)
.epilogue('For more information, read the manual at https://github.com/quilicicf/sneacret/blob/master/README.md')
.argv;