"use strict";(self.webpackChunkfes_js=self.webpackChunkfes_js||[]).push([[65],{8007:(a,s,n)=>{n.r(s),n.d(s,{data:()=>e});const e={key:"v-a951be94",path:"/reference/cli.html",title:"命令行接口",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"dev",slug:"dev",children:[]},{level:2,title:"build",slug:"build",children:[]},{level:2,title:"info",slug:"info",children:[]}],filePathRelative:"reference/cli.md",git:{updatedTime:1664436338e3,contributors:[{name:"winixt",email:"haizekuo@gmail.com",commits:1}]}}},1933:(a,s,n)=>{n.r(s),n.d(s,{default:()=>f});var e=n(6252);const p=(0,e._)("h1",{id:"命令行接口",tabindex:"-1"},[(0,e._)("a",{class:"header-anchor",href:"#命令行接口","aria-hidden":"true"},"#"),(0,e.Uk)(" 命令行接口")],-1),r=(0,e.Uk)("VuePress 命令行接口是由 "),l={href:"https://www.npmjs.com/package/@vuepress/cli",target:"_blank",rel:"noopener noreferrer"},t=(0,e.Uk)("@vuepress/cli"),o=(0,e.Uk)(" 包提供的。它是 "),c={href:"https://www.npmjs.com/package/vuepress",target:"_blank",rel:"noopener noreferrer"},i=(0,e.Uk)("vuepress"),u=(0,e.Uk)(" 包的依赖之一,当然你也可以单独安装它。"),b=(0,e.uE)('

执行 vuepress --help 来获取下列帮助信息:

Usage:\n  $ vuepress <command> [options]\n\nCommands:\n  dev [sourceDir]    Start development server\n  build [sourceDir]  Build to static site\n  info               Display environment information\n\nFor more info, run any command with the `--help` flag:\n  $ vuepress dev --help\n  $ vuepress build --help\n  $ vuepress info --help\n\nOptions:\n  -v, --version  Display version number \n  -h, --help     Display this message \n
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

dev

启动一个开发服务器,在本地开发你的 VuePress 站点。

Usage:\n  $ vuepress dev [sourceDir]\n\nOptions:\n  -c, --config <config>  Set path to config file \n  -p, --port <port>      Use specified port (default: 8080) \n  -t, --temp <temp>      Set the directory of the temporary files \n  --host <host>          Use specified host (default: 0.0.0.0) \n  --cache <cache>        Set the directory of the cache files \n  --clean-temp           Clean the temporary files before dev \n  --clean-cache          Clean the cache files before dev \n  --open                 Open browser when ready \n  --debug                Enable debug mode \n  --no-watch             Disable watching page and config files (default: true)\n  -v, --version          Display version number \n  -h, --help             Display this message\n
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

提示

通过命令行设置的配置项,会覆盖你配置文件中的同名配置项。

build

',7),m=(0,e.Uk)("将你的 VuePress 站点构建成静态文件,以便你进行后续"),d=(0,e.Uk)("部署"),h=(0,e.Uk)("。"),k=(0,e.uE)('
Usage:\n  $ vuepress build [sourceDir]\n\nOptions:\n  -c, --config <config>  Set path to config file \n  -d, --dest <dest>      Set the directory build output (default: .vuepress/dist) \n  -t, --temp <temp>      Set the directory of the temporary files \n  --cache <cache>        Set the directory of the cache files \n  --clean-temp           Clean the temporary files before build \n  --clean-cache          Clean the cache files before build \n  --debug                Enable debug mode \n  -v, --version          Display version number \n  -h, --help             Display this message\n
1
2
3
4
5
6
7
8
9
10
11
12
13

提示

通过命令行设置的配置项,会覆盖你配置文件中的同名配置项。

info

输出当前系统和依赖相关的信息。

在你想要检查你的环境,或者提交 Issue 时候,可以使用该命令。

',5),v={},f=(0,n(3744).Z)(v,[["render",function(a,s){const n=(0,e.up)("OutboundLink"),v=(0,e.up)("RouterLink");return(0,e.wg)(),(0,e.iD)(e.HY,null,[p,(0,e._)("p",null,[r,(0,e._)("a",l,[t,(0,e.Wm)(n)]),o,(0,e._)("a",c,[i,(0,e.Wm)(n)]),u]),b,(0,e._)("p",null,[m,(0,e.Wm)(v,{to:"/guide/deployment.html"},{default:(0,e.w5)((()=>[d])),_:1}),h]),k],64)}]])},3744:(a,s)=>{s.Z=(a,s)=>{const n=a.__vccOpts||a;for(const[a,e]of s)n[a]=e;return n}}}]);