1. Download
npm install @vue/cli -g
或
cnpm install @vue/cli -g
- cmd run, in which folder to install does not matter, because you want to install to the global
- You install npm where it is installed where
Check whether the download is complete :
vue -V
2. start configuring (creating a project architecture)
1. Create:
vue create the name of the project (project does not allow capital)
- Where do you put your project on it in that folder to run cmd
- 例:C:\Users\admin\Desktop\vue>vue create one
After running the following interface will appear:
default (Babel, eslint) -> default installation (Babel and eslint)
- babel is a tool of es6 turn es5
- eslint is a standardized code, the Uniform Code specification for general cooperation projects
Features SELECT Manually -> Manual installation
- According to their needs to install (to decide what I want to install)
- Generally choose to manually install
2. Manual installation:
Select the second carriage return, enter this interface
- Can be switched up and down arrows
- Space can select or deselect
( ) Babel es6-->es5
( ) TypeScript ts语言
( ) Progressive Web App (PWA) Support 渐进式的webApp. https>原生
( ) Router 路由器
( ) Vuex 数据集中管理工具
( ) CSS Pre-processors --》 sass less -->项目
( ) Linter / Formatter --》代码规范
( ) Unit Testing --》单元测试
( ) E2E Testing --》端对端的测试。
According to their own needs to choose which to install
3. You want to babel configuration files are placed in what position
After the completion of the previous step to select Enter, enter the following screen:
Where do you prefer placing config for Babel , ESLint, etc.? (Use arrow keys)
you want babel configuration files are placed in what position ⬆⬆
Dedicated config Files an In
an In package.json ------ I chose this
4. Is just save the configuration information. (Content settings)
Save this as a preset for future projects ? (Y / N)
whether to save the configuration information earlier. (Content settings)
Save y, then it tells you a name
- I gave it a name called one, Enter, and then start the installation (the process of your computer may get stuck)
5. installation
- After installation is complete there will be the lowest of those two blue tips
- cd one is to enter into your project
- npm run server that is running your project
- At the same time you will see one item in the file folder of your choice
- The project, which has a node_modules folder, this package is dependent on scaffolding
3. Follow-up treatment
Then again if you want to install, then
You will find the items you just created on the inside
- If you want to create the same project and one (), then select one (), it will automatically create