Experience: Be sure to read the official vue-cli documentation , don't look for it yourself and waste time.
Steps:
//1.命令 回车
vue create 项目名
//2.选择自定义配置
Manually select features
//3.选择你需要的配置
*Babel (必选)
TypeScript(项目中使用ts开发的话,就勾选)
Progressive Web App (PWA) Support (接口缓存,优化项目)
*Router
*Vuex
*CSS Pre-processors (css预处理器,需要)
*Linter / Formatter (代码格式,一般默认选中)
Unit Testing (代码测试)
E2E Testing(需求界面测试)
//4.根据你选的配置进行Y/N选择
//5.选择完之后,就可以运行项目
npm run serve
————————————————
原文链接:https://blog.csdn.net/diwang_718/article/details/102912743
2020.3.21
Local
U Disk
Preparations
Right-click the folder -git bush to open the command line
npm install -g @vue/cli
(If the vue version is found out, there is no need to download the scaffolding, otherwise you need to download vue first, and then download the scaffolding) It
seems that this step was wrong, come again
winpty vue.cmd create ne_project
Press the space to select
this, I don’t know why, it’s super slow, it’s been an hour and a half
2019.12.3
I used shift+right-click to open a window here, but I couldn’t create a project. I failed both times and I
had to create it with Git bush
The main steps to start creating a project here
winpty vue.cmd create hello-world
Vue cli official website through train is
successful, just a few minutes
OK, over
[Front-end unit test] Mocha and chai
The official installation document @vue/cli:
Uninstall the old version:
npm uninstall vue-cli -g
Node version requirements
Vue CLI requires Node.js 8.9 or higher (8.11.0+ recommended) .
Node official website (12.13.1): https://nodejs.org/en/download/ An
error is reported because the version of node is too low.
Reference: https://www.cnblogs.com/Jimc/p/10278254.html
Change npm Taobao source and set cnpm
1. Configuration by command
- command
npm config set registry https://registry.npm.taobao.org
- Verify command
npm config get registry
If it returns https://registry.npm.taobao.org
, the mirror configuration is successful.
Two, install by using cnpm
- Install cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
- Use cnpm
cnpm install xxx
I am really drunk and stuck here for an hour. I
checked it and tried
the installation and use of vue-cli4