bin: update usage
This commit is contained in:
parent
47e992d03b
commit
c64a4cfe76
16
bin/cli.js
16
bin/cli.js
@ -8,30 +8,34 @@ const modules = require('./modules');
|
|||||||
const version = global.__WEBPACK__ ? global.__VERSION__ : require('../package.json').version;
|
const version = global.__WEBPACK__ ? global.__VERSION__ : require('../package.json').version;
|
||||||
|
|
||||||
const examples = [
|
const examples = [
|
||||||
['Generate json file with full options', '$ blinksocks init'],
|
|
||||||
['Generate json file with minimal options', '$ blinksocks init --minimal'],
|
['Generate json file with minimal options', '$ blinksocks init --minimal'],
|
||||||
['Start blinksocks client', '$ blinksocks --config blinksocks.client.json'],
|
['Start blinksocks client', '$ blinksocks --config blinksocks.client.json'],
|
||||||
['Start blinksocks server', '$ blinksocks --config blinksocks.server.json']
|
['Start blinksocks server', '$ blinksocks --config blinksocks.server.json'],
|
||||||
|
['List all built-in presets', '$ blinksocks --list-presets']
|
||||||
];
|
];
|
||||||
|
|
||||||
const usage = `
|
const usage = `
|
||||||
|
${chalk.bold.underline(`blinksocks v${version}`)}
|
||||||
|
|
||||||
Usage: blinksocks [command] [options] ...
|
Usage: blinksocks [command] [options] ...
|
||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
|
|
||||||
init generate a pair of json file
|
init generate configuration pair
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|
||||||
-h, --help output usage information
|
-h, --help output usage information
|
||||||
-v, --version output blinksocks version
|
-v, --version output blinksocks version
|
||||||
-c, --config json file with configuration
|
-c, --config file json file with configuration
|
||||||
--list-presets list all built-in presets
|
|
||||||
-m, --minimal generate minimal json files
|
-m, --minimal generate minimal json files
|
||||||
|
--list-presets list all built-in presets
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
${examples.map(([description, example]) => ` ${chalk.gray('-')} ${description}\n ${chalk.blue(example)}`).join('\n')}
|
${examples.map(([description, example]) => ` ${chalk.gray('-')} ${description}${os.EOL} ${chalk.blue(example)}`).join(os.EOL)}
|
||||||
|
|
||||||
|
About & Help: ${chalk.underline('https://github.com/blinksocks/blinksocks')}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const argv = process.argv;
|
const argv = process.argv;
|
||||||
|
Loading…
Reference in New Issue
Block a user