1.Vue脚手架安装使用

117

1、安装 脚手架安装命令:nom install -g @vue/cli ( 4.0脚手架的安装 ),如果要指定版本在后面加@4.2 注释:Mac想要查看安装路径 /usr/local/

2.创建项目 a.通过终端到指定文件夹下面,使用vue create 文件名 b.选择Manually select features c.选择Babel, Linter d.选择 ESLint with error prevention only e.选择Lint on save在按下保存时检查代码规范 f.选择In dedicated config files 自己做配置文件 g. Save this as a preset for future projects? (y/N)是否想要你所选择的配置,需要输入y然后回车

3.在项目里面,文件介绍 a. .browserslistrc 浏览器配置 b. .editorconfig 编辑器配置 [*.{js,jsx,ts,tsx,vue}] 括号里的东西指的是。后续如果在文件里引入路径时。就可以不写后缀 indent_style = space 空格 indent_size = 2 缩进2个空格 trim_trailing_whitespace = true insert_final_newline = true

  1. .eslintrc.js 在按下保存键时,所执行的检查规则
  2. .gitignore 排除文件。一定要排除node_modules
  3. babel.config.js 解析器 把ES6代码编译成ES5代码。等等
  4. package.json 里面有很多依赖文件

面试题: 1.vue—loader 用来干嘛的? 用来解析vue文件,编译vue代码


主题列表:juejin, github, smartblue, cyanosis, channing-cyan, fancy, hydrogen, condensed-night-purple, greenwillow, v-green, vue-pro, healer-readable, mk-cute, jzman, geek-black, awesome-green, qklhk-chocolate

贡献主题:github.com/xitu/juejin…

theme: juejin highlight: