|
| 1 | +--- |
| 2 | +sidebarDepth: 3 |
| 3 | +--- |
| 4 | + |
1 | 5 | # Command-line Interface |
2 | 6 |
|
| 7 | +Currently, there are four cli commands in VuePress: [build](#build), [dev](#dev), [eject](#eject) and [info](#info). |
| 8 | + |
| 9 | +If they are not enough for you, you can also create [your own commands](#more-commands). |
| 10 | + |
3 | 11 | ## Usage |
4 | 12 |
|
5 | 13 | ```bash |
6 | | -vuepress <command> targetDir [options] |
| 14 | +vuepress <command> [options] |
| 15 | + |
| 16 | +Commands: |
| 17 | + dev [targetDir] start development server |
| 18 | + build [targetDir] build dir as static site |
| 19 | + eject [targetDir] copy the default theme into .vuepress/theme for customization. |
| 20 | + info Shows debugging information about the local environment |
7 | 21 | ``` |
8 | 22 |
|
9 | | -## build |
| 23 | +You can always add `--help` flag for more information. |
| 24 | + |
| 25 | +## Commands |
| 26 | + |
| 27 | +### build |
10 | 28 |
|
11 | 29 | Build dir as a static site. |
12 | 30 |
|
13 | | -### -p, --port `<port>` |
| 31 | +#### -p, --port `<port>` |
| 32 | + |
14 | 33 | See [port](../config/README.md#port). |
15 | 34 |
|
16 | | -### -t, --temp `<temp>` |
| 35 | +#### -t, --temp `<temp>` |
| 36 | + |
17 | 37 | See [temp](../config/README.md#temp). |
18 | 38 |
|
19 | | -### -c, --cache `[cache]` |
20 | | -### --no-cache |
| 39 | +#### -c, --cache `[cache]` |
| 40 | + |
| 41 | +#### --no-cache |
| 42 | + |
21 | 43 | See [cache](../config/README.md#cache). |
22 | 44 |
|
23 | | -### --dest `<dest>` |
| 45 | +#### -d, --dest `<dest>` |
| 46 | + |
24 | 47 | See [dest](../config/README.md#dest). |
25 | 48 |
|
26 | | -### --debug |
| 49 | +#### --debug |
| 50 | + |
27 | 51 | Start development server in debug mode. |
28 | 52 |
|
29 | | -### --silent |
| 53 | +#### --silent |
| 54 | + |
30 | 55 | Start development server in silent mode. |
31 | 56 |
|
32 | | -## dev |
| 57 | +### dev |
33 | 58 |
|
34 | 59 | Start a development server. All options from `vuepress build` are available. And there are several options specifically for dev: |
35 | 60 |
|
36 | | -### --host `<host>` |
| 61 | +#### --host `<host>` |
| 62 | + |
37 | 63 | See [host](../config/README.md#host). |
38 | 64 |
|
39 | | -### --open |
| 65 | +#### --open |
| 66 | + |
40 | 67 | Open browser when ready. |
41 | 68 |
|
42 | | -### --no-clear-screen |
| 69 | +#### --no-clear-screen |
| 70 | + |
43 | 71 | Do not clear screen when dev server is ready. Note that dev server will not clear screen if you start it in debug mode. |
44 | 72 |
|
45 | | -## eject |
| 73 | +### eject |
46 | 74 |
|
47 | 75 | Copy the default theme into `.vuepress/theme` for customization. |
48 | 76 |
|
49 | | -## info |
| 77 | +### info |
50 | 78 |
|
51 | 79 | Shows debugging information about the local environment. |
52 | 80 |
|
|
0 commit comments