Skip to content

Commit 012391c

Browse files
committed
Update docs
1 parent 5b8b7cb commit 012391c

File tree

2 files changed

+21
-19
lines changed

2 files changed

+21
-19
lines changed

Diff for: README.md

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @css-doodle/cli
22

3-
A command-line tool for css-doodle to preview and generate images.
3+
A command-line tool for css-doodle to preview and generate images/videos.
44

55
<img src="screenshot/preview.png" width="480px" alt="screenshot" />
66

@@ -15,35 +15,35 @@ npm install -g @css-doodle/cli
1515
1616
## Usage
1717

18-
```
18+
```console
1919
Usage: cssd [options] [command]
2020

2121
Options:
2222
-V, --version output the version number
2323
-h, --help display help for command
2424

2525
Commands:
26-
render Generate an image from css|cssd|html file or from CodePen link
26+
render Generate an image/video from css|cssd|html file or CodePen link
2727
preview Open a window to preview the css|cssd file
2828
generate Generate code using css-doodle generators
29-
config Display/set the configurations
29+
config Display/set configurations
3030
use Shorthand to fetch and use a custom version of css-doodle
31-
parse Print the parsed tokens, helped to debug on development
31+
parse Print the parsed tokens, helped to debug in development
3232
upgrade Upgrade CLI to the latest version
3333
```
3434

3535
## Commands
3636

3737
### render
38-
Generate an image from the css-doodle source file. The source file can be a `.css`, `.cssd`, `.html` file or CodePen link.
38+
Generate an image/video from the css-doodle source file. The source file can be a `.css`, `.cssd`, `.html` file or CodePen link.
3939

40-
* `-o, --output`: Custom output filename of the generated image.
41-
* `-x, --scale`: Scale factor of the generated image, defaults to 1.
40+
* `-o, --output`: Custom output filename of the generated result.
41+
* `-x, --scale`: Scale factor of the generated result, defaults to `2` for images, `1` for videos.
4242
* `-s, --selector`: CSS selector to target the rendered node, defaults to `css-doodle`.
43-
* `-d, --delay`: Delay after the image is rendered, e.g, `2s`.
43+
* `-d, --delay`: Delay time before taking screenshot/screencast, e.g, `2s`.
4444
* `-t, --time`: Record screen for a specific time, e.g, `10s`.
45-
* `-ws, --window-size`: The size of the rendered window, e.g, `800x600`, defaults to `1600x900`.
46-
* `--mp4`: Transform the generated `webm` file into `mp4`.
45+
* `-ws, --window-size`: The size of the rendered window, defaults to `1600x1200` for images, `1200x900` for videos.
46+
* `--mp4`: Use `mp4` as the generated video format.
4747

4848
```bash
4949
cssd render
@@ -59,7 +59,9 @@ Screen recording:
5959
cssd render -t 10s
6060
```
6161

62-
By default the generated video is in `webm` format, you can transform it automatically into `mp4` by adding `--mp4` option, or use an output filename with `.mp4` extension.
62+
By default the generated video is in `webm` format,
63+
you can transform it automatically into `mp4` by adding `--mp4` option,
64+
or use an output filename with `.mp4` extension.
6365

6466
```bash
6567
cssd render -t 10s --mp4

Diff for: bin/index.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ program
4242
.command('render')
4343
.description('Generate an image from css|cssd|html file or from CodePen link')
4444
.argument('[source]', 'css-doolde source file used to generate the image')
45-
.option('-o, --output <output>', 'Custom filename of the generated image')
46-
.option('-x, --scale <scale>', 'Scale factor of the generated image, defaults to `2`')
47-
.option('-s, --selector <selector>', 'CSS selector to target the rendered node, defaults to `css-doodle`')
48-
.option('-d, --delay <delay>', 'Delay after the image is rendered, e.g, `2s`')
45+
.option('-o, --output <output>', 'Custom output filename of the generated result')
46+
.option('-x, --scale <scale>', 'Scale factor of the generated result, defaults to `2` for images, `1` for videos')
47+
.option('-s, --selector <selector>', 'CSS selector to target the rendered node, defaults to `css-doodle`.')
48+
.option('-d, --delay <delay>', 'Delay time before taking screenshot/screencast, e.g, `2s`.')
4949
.option('-t, --time <time>', 'Record screen for a specific time, e.g, `10s`')
50-
.option('-ws, --window-size <size>', 'The size of the rendered window, e.g, `800x600`, defaults to `1600x900`')
51-
.option('--mp4', 'Transform the generated `webm` file into `mp4`')
50+
.option('-ws, --window-size <size>', 'The size of the rendered window, defaults to `1600x1200` for images, `1200x900` for videos')
51+
.option('--mp4', 'Use `mp4` as the generated video format')
5252
.action(handleRender);
5353

5454
program
@@ -75,7 +75,7 @@ const commandGenerate = program
7575

7676
const commandConfig = program
7777
.command('config')
78-
.description('Display/set the configurations')
78+
.description('Display/set configurations')
7979
.action((_, cmd) => cmd.help());
8080

8181
commandConfig

0 commit comments

Comments
 (0)