Mac 使用CLI脚手架创建 Vue项目、不同版本创建项目的项目结构差异

简介: Mac 使用CLI脚手架创建 Vue项目、不同版本创建项目的项目结构差异

正文

vue create hello-world

这个时候会让你选择一些特性:

建议:Router要选,这是单页面应用的核心。

最后会问你是否保存一个偏好设置。

Mac 进入管理员目录,由于该文件夹是隐藏的,使用Command + Shift + . 查看。

长得像这样。

{
“useTaobaoRegistry”: true,
“presets”: {
“vv”: {
“useConfigFiles”: true,
“plugins”: {
“@vue/cli-plugin-babel”: {},
“@vue/cli-plugin-router”: {
“historyMode”: false
},
“@vue/cli-plugin-vuex”: {},
“@vue/cli-plugin-eslint”: {
“config”: “base”,
“lintOn”: [
“save”
]
}
},
“vueVersion”: “2”,
“cssPreprocessor”: “dart-sass”
}
}
}

项目结构

====================================================================

Vue版本不同带来的项目结构差异


  • vue 2.x

  • vue 3.x

最后

给大家分享一些关于HTML的面试题。


相关文章
|
1月前
【Node】Mac多版本Node切换
【Node】Mac多版本Node切换
44 1
|
22天前
|
开发工具 git
MAC如何使用Git命令行上传本地项目及理解,failed to push some refs to ‘https://gitee.com/brother-barking/spxx.git
MAC如何使用Git命令行上传本地项目及理解,failed to push some refs to ‘https://gitee.com/brother-barking/spxx.git
|
1月前
使用mac版本试用版Beyond过期报错,反复提示要注册的提示信息问题,暂时没有解决方案
使用mac版本试用版Beyond过期报错,反复提示要注册的提示信息问题,暂时没有解决方案
25 1
|
1月前
|
iOS开发
mac版本Beyond Compare如何一直试用
mac版本Beyond Compare如何一直试用
44 0
mac版本Beyond Compare如何一直试用
|
1月前
|
JavaScript 小程序 前端开发
【Vue篇】mac上Vue 开发环境搭建、运行Vue项目(保姆级)
【Vue篇】mac上Vue 开发环境搭建、运行Vue项目(保姆级)
176 2
|
20天前
|
应用服务中间件 开发工具 nginx
Mac M1/M2/M3 芯片环境配置以及常用软件安装-前端
Mac M1/M2/M3 芯片环境配置以及常用软件安装-前端 最近换了台新 Mac,所有的配置和软件就重新安装下,顺便写个文章。
59 1
|
22天前
|
应用服务中间件 Shell nginx
mac m1笔记本docker 安装nginx
mac m1笔记本docker 安装nginx
63 4
|
6天前
|
存储 Java API
Mac安装jadx并配置环境
Mac安装jadx并配置环境
15 0
|
13天前
|
Java Maven
【已解决】MAC安装maven,The JAVA_HOME environment variable is not defined correctly, this environment
【已解决】MAC安装maven,The JAVA_HOME environment variable is not defined correctly, this environment
27 0