@@ -5,41 +5,45 @@ const fs = require('fs-extra');
5
5
const meow = require ( 'meow' ) ;
6
6
const puppeteer = require ( 'puppeteer' ) ;
7
7
const liveServer = require ( 'live-server' ) ;
8
+ const chalk = require ( 'chalk' ) ;
8
9
9
10
const cli = meow ( {
10
11
description : false ,
11
12
help : `
12
- NAME
13
- onepunch -- create presentation with web technology
13
+ ${ chalk . bold ( 'NAME' ) }
14
14
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' ) } ]
17
20
Initialize a presentation.
18
21
19
- onepunch serve
22
+ ${ chalk . bold ( ' onepunch serve' ) }
20
23
Open the presentation in the browser.
21
24
22
- onepunch print [-i htmlfile] [-o pdffile]
25
+ ${ chalk . bold ( ' onepunch print' ) } [ ${ chalk . bold ( '-i' ) } ${ chalk . italic ( ' htmlfile' ) } ] [${ chalk . bold ( '-o' ) } ${ chalk . italic ( ' pdffile' ) } ]
23
26
Print the presentation in a PDF file.
24
27
25
- onepunch update
28
+ ${ chalk . bold ( ' onepunch update' ) }
26
29
Update files in the src directory according to the latest release.
27
30
Please note that any custom change inside directory src will be overwritten
28
31
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' ) }
31
35
Specify the name of the directory where the project is initialized. Defaults to onepunch-presentation.
32
36
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' ) } .
35
39
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' ) } .
38
42
39
- --version
43
+ ${ chalk . bold ( ' --version' ) }
40
44
Display the version number.
41
45
42
- --help
46
+ ${ chalk . bold ( ' --help' ) }
43
47
Display the documentation.
44
48
` ,
45
49
flags : {
0 commit comments