Skip to content

Commit e84ef8c

Browse files
committed
Added color to help.
1 parent af0cfcd commit e84ef8c

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

bin/doxdox

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
var pkg = require('../package'),
44
fs = require('fs'),
5+
chalk = require('chalk'),
56
dox = require('dox'),
67
hbs = require('handlebars'),
78
helpers = require('../lib/helpers')(hbs),
@@ -61,18 +62,19 @@ while (args.length) {
6162

6263
default:
6364
process.stdout.write('\n');
64-
process.stdout.write(' Usage: doxdox <file> [options]' + '\n\n');
65+
process.stdout.write(chalk.blue(' Usage:') + ' doxdox <file> [options]' + '\n\n');
6566
process.stdout.write(' Options:' + '\n\n');
66-
process.stdout.write(' -h, --help\t\tDisplay this help message.' + '\n');
67-
process.stdout.write(' -v, --version\t\tDisplay the current installed version.' + '\n');
68-
process.stdout.write(' -t, --title\t\tSets title.' + '\n');
69-
process.stdout.write(' -d, --description\tSets description.' + '\n');
70-
process.stdout.write(' -l, --layout\t\tTemplate to render the documentation with.' + '\n');
71-
process.stdout.write(' -o, --output\t\tFile to save documentation to. Default to stdout.' + '\n');
67+
process.stdout.write(chalk.yellow(' -h, --help') + '\t\tDisplay this help message.' + '\n');
68+
process.stdout.write(chalk.yellow(' -v, --version') + '\t\tDisplay the current installed version.' + '\n');
69+
process.stdout.write(chalk.yellow(' -t, --title') + '\t\tSets title.' + '\n');
70+
process.stdout.write(chalk.yellow(' -d, --description') + '\tSets description.' + '\n');
71+
process.stdout.write(chalk.yellow(' -l, --layout') + '\t\tTemplate to render the documentation with.' + '\n');
72+
process.stdout.write(chalk.yellow(' -l, --layout') + '\t\tTemplate to render the documentation with.' + '\n');
73+
process.stdout.write(chalk.yellow(' -o, --output') + '\t\tFile to save documentation to. Default to stdout.' + '\n');
7274
process.stdout.write('\n');
7375
process.stdout.write(' Available Layouts:' + '\n\n');
74-
process.stdout.write(' - Bootstrap (default)\t\t(http://getbootstrap.com/)' + '\n');
75-
process.stdout.write(' - Markdown\t\t\t(http://daringfireball.net/projects/markdown/)' + '\n');
76+
process.stdout.write(' - Bootstrap (default)\t (http://getbootstrap.com/)' + '\n');
77+
process.stdout.write(' - Markdown\t\t (http://daringfireball.net/projects/markdown/)' + '\n');
7678
process.stdout.write('\n');
7779
process.kill();
7880
break;

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"bin": "./bin/doxdox",
66
"license": "MIT",
77
"dependencies": {
8+
"chalk": "0.5.1",
89
"dox": "0.4.6",
910
"handlebars": "1.3.0"
1011
},

0 commit comments

Comments
 (0)