vue-cli3快速开始
node
安装,略。
webpack
- 安装webpack
- npm install webpack webpack-cli -g
- 查看版本
vue-cli
- 安装vue-cli
- 查看vue-cli版本
- vue-cli2.x升级vue-cli3
- 卸载:npm uninstall vue-cli -g
- 安装:npm install -g @vue/cli
创建
- 初始化项目
- vue create xxx
- 使用默认选项(或按需选择)
运行
CLI简介
包括三部分:
目前最新版本3.4
- https://github.com/vuejs/vue-cli
CLI
- 三个主要命令
- vue create
- vue serve
- vue ui
服务
- 命令:vue-cli-service
- https://cli.vuejs.org/zh/guide/cli-service.html#使用命令
选项
vue create里选项,官方叫CLI插件。
https://cli.vuejs.org/zh/guide/#cli-插件
安装详解
安装前准备

安装命令

查看版本

这里除了npm,还出现了yarn。yarn是什么?
官网
- vue-cli3.x
- vue-cli2.x
- https://github.com/vuejs/vue-cli/tree/v2#vue-cli--
- vue-cli3源码包含的东西
- https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue
其他
升级Vue-CLI3
- https://juejin.im/post/5c4a83e36fb9a049b13e91ba
一个模板
- https://github.com/wangyupo/vue-vuex-router/tree/master/src
Vue-CLI3详解
原文:https://www.cnblogs.com/ouyida3/p/10466607.html