Skip to content

Commit 6eaed6c

Browse files
Use bold and italic styles in the documentation
1 parent bf704d3 commit 6eaed6c

File tree

3 files changed

+191
-23
lines changed

3 files changed

+191
-23
lines changed

index.js

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,45 @@ const fs = require('fs-extra');
55
const meow = require('meow');
66
const puppeteer = require('puppeteer');
77
const liveServer = require('live-server');
8+
const chalk = require('chalk');
89

910
const cli = meow({
1011
description: false,
1112
help: `
12-
NAME
13-
onepunch -- create presentation with web technology
13+
${chalk.bold('NAME')}
1414
15-
SYNOPSIS
16-
onepunch init [-n directory_name]
15+
${chalk.bold('onepunch')} -- create presentations with web technology
16+
17+
${chalk.bold('SYNOPSIS')}
18+
19+
${chalk.bold('onepunch init')} [${chalk.bold('-n')} ${chalk.italic('directory_name')}]
1720
Initialize a presentation.
1821
19-
onepunch serve
22+
${chalk.bold('onepunch serve')}
2023
Open the presentation in the browser.
2124
22-
onepunch print [-i htmlfile] [-o pdffile]
25+
${chalk.bold('onepunch print')} [${chalk.bold('-i')} ${chalk.italic('htmlfile')}] [${chalk.bold('-o')} ${chalk.italic('pdffile')}]
2326
Print the presentation in a PDF file.
2427
25-
onepunch update
28+
${chalk.bold('onepunch update')}
2629
Update files in the src directory according to the latest release.
2730
Please note that any custom change inside directory src will be overwritten
2831
29-
OPTIONS
30-
-n or --name directory_name
32+
${chalk.bold('OPTIONS')}
33+
34+
${chalk.bold('-n')} or ${chalk.bold('--name')} ${chalk.italic('directory_name')}
3135
Specify the name of the directory where the project is initialized. Defaults to onepunch-presentation.
3236
33-
-i or --input htmlfile
34-
Specify the HTML file to print, defaults to "index.html".
37+
${chalk.bold('-i')} or ${chalk.bold('--input')} ${chalk.italic('htmlfile')}
38+
Specify the HTML file to print, defaults to ${chalk.italic('index.html')}.
3539
36-
-o or --output pdffile
37-
Specify the name of the PDF file in output, defaults to "index.pdf".
40+
${chalk.bold('-o')} or ${chalk.bold('--output')} ${chalk.italic('pdffile')}
41+
Specify the name of the PDF file in output, defaults to ${chalk.italic('index.pdf')}.
3842
39-
--version
43+
${chalk.bold('--version')}
4044
Display the version number.
4145
42-
--help
46+
${chalk.bold('--help')}
4347
Display the documentation.
4448
`,
4549
flags: {

package-lock.json

Lines changed: 171 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
},
3333
"license": "MIT",
3434
"dependencies": {
35+
"chalk": "^3.0.0",
3536
"fs-extra": "^8.1.0",
3637
"live-server": "^1.2.1",
3738
"meow": "^6.0.0",

0 commit comments

Comments
 (0)