Skip to content

Commit 94a1ce0

Browse files
committed
chore(help): refactor help for more cleaner code
refactor help
1 parent da6d76c commit 94a1ce0

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

lib/groups/help.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,16 @@ class HelpGroup {
2121
}
2222

2323
run() {
24-
const b = s => chalk.blue(s);
25-
const l = s => chalk.white(s);
24+
const { underline, bold } = chalk.white
2625
const o = s => chalk.keyword('orange')(s);
27-
2826
const commandLineUsage = require('command-line-usage');
2927
const options = require('../utils/cli-flags');
30-
const title = chalk.white.bold('⬡ ') + chalk.white.underline('webpack') + chalk.white.bold(' ⬡');
28+
const title = bold('⬡ ') + underline('webpack') + bold(' ⬡');
3129
const desc = 'The build tool for modern web applications';
32-
const websitelink = ' ' + chalk.white.underline('https://webpack.js.org');
30+
const websitelink = ' ' + underline('https://webpack.js.org');
3331

34-
const usage = chalk.white.bold('Usage') + ': ' + '`' + o('webpack [...options] | <command>') + '`';
35-
const examples = chalk.white.bold('Example') + ': ' + '`' + o('webpack help --flag | <command>') + '`';
32+
const usage = bold('Usage') + ': ' + '`' + o('webpack [...options] | <command>') + '`';
33+
const examples = bold('Example') + ': ' + '`' + o('webpack help --flag | <command>') + '`';
3634

3735
const hh = ` ${title}\n
3836
${websitelink}\n

0 commit comments

Comments
 (0)