-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelp.js
35 lines (34 loc) · 1.76 KB
/
help.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
module.exports = {
helpScreen: function () {
// Platform independent end-of-line character
var endOfLine = require('os').EOL;
// console colours
// eslint-disable-next-line no-unused-vars
const colours = require('colors');
// parse package.json for the version number
const package = require('./package.json');
// Display help screen
console.log('%s [a.k.a %s]'.cyan, package.name, Object.keys(package.bin)[0]);
console.log('Read the docs: '.green + package.homepage);
console.log('Support & bugs: '.magenta + package.bugs.url);
console.log(endOfLine);
console.log('%s'.italic, package.description);
//console.log(endOfLine);
console.log('VERSION:'.grey);
console.log(' ' + package.version);
console.log(endOfLine);
console.log('USAGE:'.grey);
console.log(' ' + 'hashref errorReference [options]');
console.log(endOfLine);
console.log('OPTIONS:'.grey);
console.log(' ' + 'errorReference ' + 'The Akamai Error Reference number to lookup'.grey);
console.log(' ' + '--decode <true|false> ' + 'Enable or disable decoding of URLs and user-agent [true]'.grey);
console.log(' ' + '--no-color ' + 'Switches off colour output'.grey);
console.log(' ' + '--version ' + 'Display version number'.grey);
console.log(' ' + '--help ' + 'Display this help'.grey);
console.log(endOfLine);
console.log('EXAMPLES:'.grey);
console.log(' hashref 18.2d351ab8.1557333295.a4e16ab');
console.log(' hashref 18.2d351ab8.1557333295.a4e16ab --decode false');
}
};