-
Notifications
You must be signed in to change notification settings - Fork 0
/
cli.js
37 lines (32 loc) · 1.1 KB
/
cli.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
#!/usr/bin/env node
const yargs = require('yargs/yargs');
const { hideBin } = require('yargs/helpers');
const argv = yargs(hideBin(process.argv)).argv;
const logo = `
██████ ██ ██ ████████ ██ ██ ███████
██ ██ ██ ██ ██ ██ ██ ███
██ ██ ██ ██ ██ ██ ██ ███
██ ▄▄ ██ ██ ██ ██ ██ ██ ███
██████ ██████ ██ ██ ███████ ███████
▀▀
`;
const fgGreen = '\x1b[32m';
console.log(fgGreen, logo);
function qutilz() {
module.exports = require('./test-gen.js');
}
function report() {
module.exports = require('./reporter.js');
}
function run() {
if (argv.specs) {
qutilz();
return;
}
if (argv.report) {
report();
return;
}
console.log('Please try specifying the --spescs flag: npx quitilz --specs');
}
run();