"use strict";(self.webpackChunkfes_js=self.webpackChunkfes_js||[]).push([[65],{8007:(n,s,e)=>{e.r(s),e.d(s,{data:()=>a});const a={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:1656304886e3,contributors:[{name:"wanchun",email:"445436867@qq.com",commits:1}]}}},5173:(n,s,e)=>{e.r(s),e.d(s,{default:()=>v});var a=e(6252);const p=(0,a._)("h1",{id:"命令行接口",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#命令行接口","aria-hidden":"true"},"#"),(0,a.Uk)(" 命令行接口")],-1),l=(0,a.Uk)("VuePress 命令行接口是由 "),r={href:"https://www.npmjs.com/package/@vuepress/cli",target:"_blank",rel:"noopener noreferrer"},t=(0,a.Uk)("@vuepress/cli"),c=(0,a.Uk)(" 包提供的。它是 "),o={href:"https://www.npmjs.com/package/vuepress",target:"_blank",rel:"noopener noreferrer"},i=(0,a.Uk)("vuepress"),u=(0,a.Uk)(" 包的依赖之一,当然你也可以单独安装它。"),b=(0,a.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),d=(0,a.Uk)("将你的 VuePress 站点构建成静态文件,以便你进行后续"),m=(0,a.Uk)("部署"),h=(0,a.Uk)("。"),k=(0,a.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),f={},v=(0,e(3744).Z)(f,[["render",function(n,s){const e=(0,a.up)("OutboundLink"),f=(0,a.up)("RouterLink");return(0,a.wg)(),(0,a.iD)(a.HY,null,[p,(0,a._)("p",null,[l,(0,a._)("a",r,[t,(0,a.Wm)(e)]),c,(0,a._)("a",o,[i,(0,a.Wm)(e)]),u]),b,(0,a._)("p",null,[d,(0,a.Wm)(f,{to:"/guide/deployment.html"},{default:(0,a.w5)((()=>[m])),_:1}),h]),k],64)}]])},3744:(n,s)=>{s.Z=(n,s)=>{const e=n.__vccOpts||n;for(const[n,a]of s)e[n]=a;return e}}}]);