fes.js/assets/js/v-a951be94.9550ef17.js

1 line
9.2 KiB
JavaScript

"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:1680249231e3,contributors:[{name:"wanchun",email:"445436867@qq.com",commits:1}]}}},1933:(a,s,n)=>{n.r(s),n.d(s,{default:()=>i});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={href:"https://www.npmjs.com/package/@vuepress/cli",target:"_blank",rel:"noopener noreferrer"},l={href:"https://www.npmjs.com/package/vuepress",target:"_blank",rel:"noopener noreferrer"},t=(0,e.uE)('<p>执行 <code>vuepress --help</code> 来获取下列帮助信息:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>Usage:\n $ vuepress <span class="token operator">&lt;</span>command<span class="token operator">&gt;</span> <span class="token punctuation">[</span>options<span class="token punctuation">]</span>\n\nCommands:\n dev <span class="token punctuation">[</span>sourceDir<span class="token punctuation">]</span> Start development server\n build <span class="token punctuation">[</span>sourceDir<span class="token punctuation">]</span> Build to static site\n info Display environment information\n\nFor <span class="token function">more</span> info, run any <span class="token builtin class-name">command</span> with the <span class="token variable"><span class="token variable">`</span><span class="token parameter variable">--help</span><span class="token variable">`</span></span> flag:\n $ vuepress dev <span class="token parameter variable">--help</span>\n $ vuepress build <span class="token parameter variable">--help</span>\n $ vuepress info <span class="token parameter variable">--help</span>\n\nOptions:\n -v, <span class="token parameter variable">--version</span> Display version number \n -h, <span class="token parameter variable">--help</span> Display this message \n</code></pre><div class="line-numbers"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br></div></div><h2 id="dev" tabindex="-1"><a class="header-anchor" href="#dev" aria-hidden="true">#</a> dev</h2><p>启动一个开发服务器,在本地开发你的 VuePress 站点。</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>Usage:\n $ vuepress dev <span class="token punctuation">[</span>sourceDir<span class="token punctuation">]</span>\n\nOptions:\n -c, <span class="token parameter variable">--config</span> <span class="token operator">&lt;</span>config<span class="token operator">&gt;</span> Set path to config <span class="token function">file</span> \n -p, <span class="token parameter variable">--port</span> <span class="token operator">&lt;</span>port<span class="token operator">&gt;</span> Use specified port <span class="token punctuation">(</span>default: <span class="token number">8080</span><span class="token punctuation">)</span> \n -t, <span class="token parameter variable">--temp</span> <span class="token operator">&lt;</span>temp<span class="token operator">&gt;</span> Set the directory of the temporary files \n <span class="token parameter variable">--host</span> <span class="token operator">&lt;</span>host<span class="token operator">&gt;</span> Use specified <span class="token function">host</span> <span class="token punctuation">(</span>default: <span class="token number">0.0</span>.0.0<span class="token punctuation">)</span> \n <span class="token parameter variable">--cache</span> <span class="token operator">&lt;</span>cache<span class="token operator">&gt;</span> 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 <span class="token parameter variable">--open</span> Open browser when ready \n <span class="token parameter variable">--debug</span> Enable debug mode \n --no-watch Disable watching page and config files <span class="token punctuation">(</span>default: <span class="token boolean">true</span><span class="token punctuation">)</span>\n -v, <span class="token parameter variable">--version</span> Display version number \n -h, <span class="token parameter variable">--help</span> Display this message\n</code></pre><div class="line-numbers"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br></div></div><div class="custom-container tip"><p class="custom-container-title">提示</p><p>通过命令行设置的配置项,会覆盖你配置文件中的同名配置项。</p></div><h2 id="build" tabindex="-1"><a class="header-anchor" href="#build" aria-hidden="true">#</a> build</h2>',7),c=(0,e.uE)('<div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>Usage:\n $ vuepress build <span class="token punctuation">[</span>sourceDir<span class="token punctuation">]</span>\n\nOptions:\n -c, <span class="token parameter variable">--config</span> <span class="token operator">&lt;</span>config<span class="token operator">&gt;</span> Set path to config <span class="token function">file</span> \n -d, <span class="token parameter variable">--dest</span> <span class="token operator">&lt;</span>dest<span class="token operator">&gt;</span> Set the directory build output <span class="token punctuation">(</span>default: .vuepress/dist<span class="token punctuation">)</span> \n -t, <span class="token parameter variable">--temp</span> <span class="token operator">&lt;</span>temp<span class="token operator">&gt;</span> Set the directory of the temporary files \n <span class="token parameter variable">--cache</span> <span class="token operator">&lt;</span>cache<span class="token operator">&gt;</span> 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 <span class="token parameter variable">--debug</span> Enable debug mode \n -v, <span class="token parameter variable">--version</span> Display version number \n -h, <span class="token parameter variable">--help</span> Display this message\n</code></pre><div class="line-numbers"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br></div></div><div class="custom-container tip"><p class="custom-container-title">提示</p><p>通过命令行设置的配置项,会覆盖你配置文件中的同名配置项。</p></div><h2 id="info" tabindex="-1"><a class="header-anchor" href="#info" aria-hidden="true">#</a> info</h2><p>输出当前系统和依赖相关的信息。</p><p>在你想要检查你的环境,或者提交 Issue 时候,可以使用该命令。</p>',5),o={},i=(0,n(3744).Z)(o,[["render",function(a,s){const n=(0,e.up)("OutboundLink"),o=(0,e.up)("RouterLink");return(0,e.wg)(),(0,e.iD)(e.HY,null,[p,(0,e._)("p",null,[(0,e.Uk)("VuePress 命令行接口是由 "),(0,e._)("a",r,[(0,e.Uk)("@vuepress/cli"),(0,e.Wm)(n)]),(0,e.Uk)(" 包提供的。它是 "),(0,e._)("a",l,[(0,e.Uk)("vuepress"),(0,e.Wm)(n)]),(0,e.Uk)(" 包的依赖之一,当然你也可以单独安装它。")]),t,(0,e._)("p",null,[(0,e.Uk)("将你的 VuePress 站点构建成静态文件,以便你进行后续"),(0,e.Wm)(o,{to:"/guide/deployment.html"},{default:(0,e.w5)((()=>[(0,e.Uk)("部署")])),_:1}),(0,e.Uk)("。")]),c],64)}]])},3744:(a,s)=>{s.Z=(a,s)=>{const n=a.__vccOpts||a;for(const[a,e]of s)n[a]=e;return n}}}]);