import{_ as r,r as t,o as p,c as o,b as a,d as e,a as s,w as c,f as i}from"./app.1fff394b.js";const d={},u=a("h1",{id:"命令行接口",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#命令行接口","aria-hidden":"true"},"#"),e(" 命令行接口")],-1),v={href:"https://www.npmjs.com/package/@vuepress/cli",target:"_blank",rel:"noopener noreferrer"},m={href:"https://www.npmjs.com/package/vuepress",target:"_blank",rel:"noopener noreferrer"},b=i(`
执行 vuepress --help
来获取下列帮助信息:
Usage:
$ vuepress <command> [options]
Commands:
dev [sourceDir] Start development server
build [sourceDir] Build to static site
info Display environment information
For more info, run any command with the \`--help\` flag:
$ vuepress dev --help
$ vuepress build --help
$ vuepress info --help
Options:
-v, --version Display version number
-h, --help Display this message
启动一个开发服务器,在本地开发你的 VuePress 站点。
Usage:
$ vuepress dev [sourceDir]
Options:
-c, --config <config> Set path to config file
-p, --port <port> Use specified port (default: 8000)
-t, --temp <temp> Set the directory of the temporary files
--host <host> Use specified host (default: 0.0.0.0)
--cache <cache> Set the directory of the cache files
--clean-temp Clean the temporary files before dev
--clean-cache Clean the cache files before dev
--open Open browser when ready
--debug Enable debug mode
--no-watch Disable watching page and config files (default: true)
-v, --version Display version number
-h, --help Display this message
提示
通过命令行设置的配置项,会覆盖你配置文件中的同名配置项。
Usage:
$ vuepress build [sourceDir]
Options:
-c, --config <config> Set path to config file
-d, --dest <dest> Set the directory build output (default: .vuepress/dist)
-t, --temp <temp> Set the directory of the temporary files
--cache <cache> Set the directory of the cache files
--clean-temp Clean the temporary files before build
--clean-cache Clean the cache files before build
--debug Enable debug mode
-v, --version Display version number
-h, --help Display this message
提示
通过命令行设置的配置项,会覆盖你配置文件中的同名配置项。
输出当前系统和依赖相关的信息。
在你想要检查你的环境,或者提交 Issue 时候,可以使用该命令。
`,5);function k(f,g){const n=t("ExternalLinkIcon"),l=t("RouterLink");return p(),o("div",null,[u,a("p",null,[e("VuePress 命令行接口是由 "),a("a",v,[e("@vuepress/cli"),s(n)]),e(" 包提供的。它是 "),a("a",m,[e("vuepress"),s(n)]),e(" 包的依赖之一,当然你也可以单独安装它。")]),b,a("p",null,[e("将你的 VuePress 站点构建成静态文件,以便你进行后续"),s(l,{to:"/guide/deployment.html"},{default:c(()=>[e("部署")]),_:1}),e("。")]),h])}const y=r(d,[["render",k],["__file","cli.html.vue"]]);export{y as default};