1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([[231],{560:function(s,t,a){"use strict";a.r(t);var e=a(3),n=Object(e.a)({},(function(){var s=this,t=s._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[t("h1",{attrs:{id:"vue-cli-v3-x-创建项目使用记录"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#vue-cli-v3-x-创建项目使用记录"}},[s._v("#")]),s._v(" Vue CLi v3.x 创建项目使用记录")]),s._v(" "),t("p",[t("a",{attrs:{href:"https://cli.vuejs.org/zh/",target:"_blank",rel:"noopener noreferrer"}},[s._v("官方文档"),t("OutboundLink")],1)]),s._v(" "),t("p",[s._v("以下使用的CLi版本是 v3.11.0")]),s._v(" "),t("h2",{attrs:{id:"vue-create"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#vue-create"}},[s._v("#")]),s._v(" vue create")]),s._v(" "),t("ol",[t("li",[s._v("运行以下命令来创建一个新项目")])]),s._v(" "),t("div",{staticClass:"language-sh line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[s._v("vue create hello-world\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br")])]),t("ol",{attrs:{start:"2"}},[t("li",[s._v("你会被提示选取一个 preset (预设)。你可以选默认的包含了基本的 Babel + ESLint 设置的 preset,也可以选“手动选择特性”来选取需要的特性。")])]),s._v(" "),t("div",{staticClass:"language-sh line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[s._v("Vue CLI v3.11.0\n? Please pick a preset: "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("Use arrow keys"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" default "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("babel, eslint"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n Manually "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("select")]),s._v(" features "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("手动选择特性"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br"),t("span",{staticClass:"line-number"},[s._v("3")]),t("br"),t("span",{staticClass:"line-number"},[s._v("4")]),t("br")])]),t("p",[s._v("默认预设只包含Babel + ESLint,如需要使用到Router、CSS Pre-processors(CSS预处理器)等需要选手动选择特性。")]),s._v(" "),t("ol",{attrs:{start:"3"}},[t("li",[s._v("手动选择特性")])]),s._v(" "),t("div",{staticClass:"language-sh line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[s._v("Vue CLI v3.11.0\n? Please pick a preset: Manually "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("select")]),s._v(" features\n? Check the features needed "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" your project: "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("Press "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("space"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" to select, "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("a"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" to toggle all, "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("i"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" to invert selection"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("*"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" Babel "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 将现代JS转成旧版本(出于兼容性考虑)")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" TypeScript "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 添加对TS的支持")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" Progressive Web App "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("PWA"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" Support "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 渐进式Web应用程序(PWA)的支持")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" Router "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 路由")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" Vuex "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 状态管理")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" CSS Pre-processors "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# css预处理器")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("*"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" Linter / Formatter "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 使用ESLint检查代码质量")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" Unit Testing "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 单元测试")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" E2E Testing "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# E2E测试")]),s._v("\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br"),t("span",{staticClass:"line-number"},[s._v("3")]),t("br"),t("span",{staticClass:"line-number"},[s._v("4")]),t("br"),t("span",{staticClass:"line-number"},[s._v("5")]),t("br"),t("span",{staticClass:"line-number"},[s._v("6")]),t("br"),t("span",{staticClass:"line-number"},[s._v("7")]),t("br"),t("span",{staticClass:"line-number"},[s._v("8")]),t("br"),t("span",{staticClass:"line-number"},[s._v("9")]),t("br"),t("span",{staticClass:"line-number"},[s._v("10")]),t("br"),t("span",{staticClass:"line-number"},[s._v("11")]),t("br"),t("span",{staticClass:"line-number"},[s._v("12")]),t("br")])]),t("blockquote",[t("p",[s._v("图形化界面有对特性的介绍")])]),s._v(" "),t("ol",{attrs:{start:"4"}},[t("li",[s._v("使用路由器的历史记录模式?(需要适当的服务器设置才能在生产中进行索引回退)通过使用HTML5历史记录API,URL不再需要'#'字符。")])]),s._v(" "),t("div",{staticClass:"language-sh line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[s._v("Vue CLI v3.11.0\n? Please pick a preset: Manually "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("select")]),s._v(" features\n? Check the features needed "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" your project: Babel, Router, CSS Pre-processors, Linter\n? Use "),t("span",{pre:!0,attrs:{class:"token function"}},[s._v("history")]),s._v(" mode "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" router? "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("Requires proper server setup "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" index fallback "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("in")]),s._v(" production"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("Y/n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br"),t("span",{staticClass:"line-number"},[s._v("3")]),t("br"),t("span",{staticClass:"line-number"},[s._v("4")]),t("br")])]),t("ol",{attrs:{start:"5"}},[t("li",[s._v("选择css预处理器")])]),s._v(" "),t("div",{staticClass:"language-sh line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[s._v("Vue CLI v3.11.0\n? Please pick a preset: Manually "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("select")]),s._v(" features\n? Check the features needed "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" your project: Babel, Router, CSS Pre-processors, Linter\n? Use "),t("span",{pre:!0,attrs:{class:"token function"}},[s._v("history")]),s._v(" mode "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" router? "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("Requires proper server setup "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" index fallback "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("in")]),s._v(" production"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" Yes\n? Pick a CSS pre-processor "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("PostCSS, Autoprefixer and CSS Modules are supported by default"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(":\n Sass/SCSS "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("with dart-sass"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n Sass/SCSS "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("with node-sass"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n Less\n"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" Stylus\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br"),t("span",{staticClass:"line-number"},[s._v("3")]),t("br"),t("span",{staticClass:"line-number"},[s._v("4")]),t("br"),t("span",{staticClass:"line-number"},[s._v("5")]),t("br"),t("span",{staticClass:"line-number"},[s._v("6")]),t("br"),t("span",{staticClass:"line-number"},[s._v("7")]),t("br"),t("span",{staticClass:"line-number"},[s._v("8")]),t("br"),t("span",{staticClass:"line-number"},[s._v("9")]),t("br")])]),t("ol",{attrs:{start:"6"}},[t("li",[s._v("选择ESLint配置")])]),s._v(" "),t("div",{staticClass:"language-sh line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[s._v("Vue CLI v3.11.0\n? Please pick a preset: Manually "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("select")]),s._v(" features\n? Check the features needed "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" your project: Babel, Router, CSS Pre-processors, Linter\n? Use "),t("span",{pre:!0,attrs:{class:"token function"}},[s._v("history")]),s._v(" mode "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" router? "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("Requires proper server setup "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" index fallback "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("in")]),s._v(" production"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" Yes\n? Pick a CSS pre-processor "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("PostCSS, Autoprefixer and CSS Modules are supported by default"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(": Stylus\n? Pick a linter / formatter config: "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("Use arrow keys"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n ESLint with error prevention only\n ESLint + Airbnb config\n"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" ESLint + Standard config "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("标准配置"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n ESLint + Prettier\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br"),t("span",{staticClass:"line-number"},[s._v("3")]),t("br"),t("span",{staticClass:"line-number"},[s._v("4")]),t("br"),t("span",{staticClass:"line-number"},[s._v("5")]),t("br"),t("span",{staticClass:"line-number"},[s._v("6")]),t("br"),t("span",{staticClass:"line-number"},[s._v("7")]),t("br"),t("span",{staticClass:"line-number"},[s._v("8")]),t("br"),t("span",{staticClass:"line-number"},[s._v("9")]),t("br"),t("span",{staticClass:"line-number"},[s._v("10")]),t("br")])]),t("ol",{attrs:{start:"7"}},[t("li",[s._v("选择附加的lint特性?")])]),s._v(" "),t("div",{staticClass:"language-sh line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[s._v("Pick additional lint features: "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("Press "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("space"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" to select, "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("a"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" to toggle all, "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("i"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" to invert selection"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("*"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" Lint on save (保存时检查lint)\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" Lint and fix on commit (提交时 lint 和 fix)\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br"),t("span",{staticClass:"line-number"},[s._v("3")]),t("br")])]),t("ol",{attrs:{start:"8"}},[t("li",[s._v("你喜欢把配置放在什么地方?比如Babel、PostCSS、ESLint等配置")])]),s._v(" "),t("div",{staticClass:"language-sh line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[s._v("Vue CLI v3.11.0\n? Please pick a preset: Manually "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("select")]),s._v(" features\n? Check the features needed "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" your project: Babel, Router, CSS Pre-processors, Linter\n? Use "),t("span",{pre:!0,attrs:{class:"token function"}},[s._v("history")]),s._v(" mode "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" router? "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("Requires proper server setup "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" index fallback "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("in")]),s._v(" production"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" Yes\n? Pick a CSS pre-processor "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("PostCSS, Autoprefixer and CSS Modules are supported by default"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(": Stylus\n? Pick a linter / formatter config: Standard\n? Pick additional lint features: "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("Press "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("space"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" to select, "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("a"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" to toggle all, "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("i"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" to invert selection"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("Lint on save\n? Where "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("do")]),s._v(" you prefer placing config "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" Babel, PostCSS, ESLint, etc.? "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("Use arrow keys"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" In dedicated config files "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("在专用的配置文件"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n In package.json "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("在package.json"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br"),t("span",{staticClass:"line-number"},[s._v("3")]),t("br"),t("span",{staticClass:"line-number"},[s._v("4")]),t("br"),t("span",{staticClass:"line-number"},[s._v("5")]),t("br"),t("span",{staticClass:"line-number"},[s._v("6")]),t("br"),t("span",{staticClass:"line-number"},[s._v("7")]),t("br"),t("span",{staticClass:"line-number"},[s._v("8")]),t("br"),t("span",{staticClass:"line-number"},[s._v("9")]),t("br"),t("span",{staticClass:"line-number"},[s._v("10")]),t("br")])]),t("ol",{attrs:{start:"9"}},[t("li",[s._v("将这次已选项保存为一个将来可复用的 preset (预设)?")])]),s._v(" "),t("div",{staticClass:"language-sh line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[s._v("Vue CLI v3.11.0\n? Please pick a preset: Manually "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("select")]),s._v(" features\n? Check the features needed "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" your project: Babel, Router, CSS Pre-processors, Linter\n? Use "),t("span",{pre:!0,attrs:{class:"token function"}},[s._v("history")]),s._v(" mode "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" router? "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("Requires proper server setup "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" index fallback "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("in")]),s._v(" production"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" Yes\n? Pick a CSS pre-processor "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("PostCSS, Autoprefixer and CSS Modules are supported by default"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(": Stylus\n? Pick a linter / formatter config: Standard\n? Pick additional lint features: "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("Press "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("space"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" to select, "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("a"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" to toggle all, "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("i"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" to invert selection"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("Lint on save\n? Where "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("do")]),s._v(" you prefer placing config "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" Babel, PostCSS, ESLint, etc.? In dedicated config files\n? Save this as a preset "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("for")]),s._v(" future projects? "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("y/N"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br"),t("span",{staticClass:"line-number"},[s._v("3")]),t("br"),t("span",{staticClass:"line-number"},[s._v("4")]),t("br"),t("span",{staticClass:"line-number"},[s._v("5")]),t("br"),t("span",{staticClass:"line-number"},[s._v("6")]),t("br"),t("span",{staticClass:"line-number"},[s._v("7")]),t("br"),t("span",{staticClass:"line-number"},[s._v("8")]),t("br"),t("span",{staticClass:"line-number"},[s._v("9")]),t("br")])]),t("blockquote",[t("p",[s._v("~/.vuerc")]),s._v(" "),t("p",[s._v("被保存的 preset 将会存在用户的 home 目录下一个名为 "),t("code",[s._v(".vuerc")]),s._v(" 的 JSON 文件里。如果你想要修改被保存的 preset / 选项,可以编辑这个文件。")])]),s._v(" "),t("h2",{attrs:{id:"图形化界面"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#图形化界面"}},[s._v("#")]),s._v(" 图形化界面")]),s._v(" "),t("p",[s._v("对于Vue CLi使用还不是特别熟悉的同学,可以使用图形化界面。运行以下命令会自动打开界面")]),s._v(" "),t("div",{staticClass:"language-sh line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[s._v("vue ui\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br")])]),t("blockquote",[t("p",[s._v("图形化界面有中文系统,直观的功能界面,以及特性的介绍等。")])])])}),[],!1,null,null,null);t.default=n.exports}}]);
|