主题
安装
vue-cli4
包装 vue-cli4
shellnpm install @vue/cli -g
创建项目
shellvue create projectName
- Please pick a preset
- Manually select features 自定义安装
- Check the features needed for your project
- 空格选择需要的
- 回车确定
- Choose a version of Vue.js that you want to start the project with vue的版本
- 2
- 3
- Use history mode for router 是否选择 history 路由模式
- y
- n
- Use class-style component syntax 使用css预处理器吗
- Use Babel alongside TypeScript (required for modern mode, auto-detected polyfills, transpliting JSX):
N
- Pick a linter / formatter config:
Basic
- Pick additional lint features:
Lint on save
- Where do you prefer placing config for Babel, ESLint, etc. ? 配置文件放哪?
- ==In dedicated config files== 单独当一个文件夹里
- In package.json
- Save this as a preset for future projects 此次配置保存给未来使用
- Please pick a preset
旧项目升级到新版
shellvue add vue-next