一步步创建vue-element-admin框架实现001-创建cli3项目

一步步创建vue-element-admin框架实现001-创建cli3项目

使用说明:

一步步创建vue-element-admin框架是基于vue-element-admin和vue-admin-template基础版的代码来实现的,文章会经常说直接拷贝项目的文件

使用cli3创建工程,vue create my-vue-element-admin

1.有三个选择:

  • Default ([Vue 2] babel, eslint) (创建vue2.x)

  • Default (Vue 3 Preview) ([Vue 3] babel, eslint)(创建vue3.x)

  • Manually select features(手动选择功能)

我们选择Manually select features,自己配置

Vue CLI v4.5.7

? Please pick a preset: (Use arrow keys)
> Default ([Vue 2] babel, eslint)
  Default (Vue 3 Preview) ([Vue 3] babel, eslint)
  Manually select features

2.选择需要的环境,上下选择,空格选择或取消,我这边只选择Choose Vue version和Babel,其他功能自己慢慢自己安装就好

? Check the features needed for your project: (Press <space> to select, <a> to toggle all, <i> to invert selection)
>(*) Choose Vue version #选择版本
 (*) Babel #转码器,可以将ES6代码转为ES5代码,从而在现有环境执行。
 ( ) TypeScript #新语法,TypeScript是一个JavaScript(后缀.js)的超集(后缀.ts)包含并扩展了 JavaScript 的语法,需要被编译输出为 JavaScript在浏览器运行,目前较少人再用
 ( ) Progressive Web App (PWA) Support #渐进式Web应用程序
 ( ) Router #路由
 ( ) Vuex #vue的状态管理模式
 ( ) CSS Pre-processors #CSS 预处理器(如:less、sass)
 ( ) Linter / Formatter #代码风格检查和格式化(如:ESlint)
 ( ) Unit Testing #单元测试
 ( ) E2E Testing #e2e(end to end) 测试 

3.选择版本Choose Vue version:2.x

? Choose a version of Vue.js that you want to start the project with (Use arrow keys)
> 2.x
  3.x (Preview)

4.选择Babel:In dedicated config files,把这个配置独立出来,不整合在package.json文件

? Where do you prefer placing config for Babel, ESLint, etc.? (Use arrow keys)
> In dedicated config files
  In package.json

5.还有是否保存模板,就no就好,然后回车就会开始创建工程了

Save this as a preset for future projects? No

6.安装成功,整个安装脚本

Vue CLI v4.5.7

? Please pick a preset: Manually select features
? Check the features needed for your project: Choose Vue version, Babel
? Choose a version of Vue.js that you want to start the project with 2.x
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files
? Save this as a preset for future projects? No


Vue CLI v4.5.7
✨  Creating project in D:\vuework\my-vue-element-admin.
🗃  Initializing git repository...
⚙️  Installing CLI plugins. This might take a while...


> core-js@3.13.1 postinstall D:\vuework\my-vue-element-admin\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> ejs@2.7.4 postinstall D:\vuework\my-vue-element-admin\node_modules\ejs
> node ./postinstall.js

added 1207 packages from 639 contributors in 104.96s

68 packages are looking for funding
  run `npm fund` for details

🚀  Invoking generators...
📦  Installing additional dependencies...

added 3 packages from 1 contributor in 10.754s

68 packages are looking for funding
  run `npm fund` for details

⚓  Running completion hooks...

📄  Generating README.md...

🎉  Successfully created project my-vue-element-admin.
👉  Get started with the following commands:

 $ cd my-vue-element-admin
 $ npm run serve

7.运行项目

 $ cd my-vue-element-admin
 $ npm run serve
 #-----------------------------------------------------运行成功-----------------------------------------------------------------------
  DONE  Compiled successfully in 1856ms                                                       
  App running at:
  - Local:   http://localhost:8080/
  Note that the development build is not optimized.
  To create a production build, run npm run build.

8.浏览器直接访问:http://localhost:8080/

创建成功
请添加图片描述

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

binggoling

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值