Vue02_ first vue-cli project

Vue02_ first vue-cli project


  • Download and installation of nodejs

Download from the official website (choose the windows64-bit version): http://nodejs.cn/download/

Installation: no brain next step

Test whether the installation is successful:
Insert picture description here
install Taobao mirror:

npm install cnpm -g

Use Taobao mirror to install vue-cli:

cnpm install vue-cli -g

Path for global installation:

C:\Users\[电脑用户名]\AppData\Roaming\npm\node_modules

  • Create the vue-cli project:
vue init webpack myvue
? Project name myvue
? Project description A Vue.js project
? Author BLU
? Vue build
> Runtime + Compiler: recommended for most users
  Runtime-only: about 6KB lighter min+gzip, but templates (or any Vue-specific HTML) are ONLY allowed in .vue files - re
nder functions are required elsewhere
? Install vue-router? (Y/n) n
? Use ESLint to lint your code? (Y/n) n
? Set up unit tests (Y/n) n
? Setup e2e tests with Nightwatch? (Y/n) n
? Should we run `npm install` for you after the project has been created? (recommended)
  Yes, use NPM
  Yes, use Yarn
> No, I will handle that myself
Vue build 选择 Runtime + Compiler: recommended for most users
Should we run `npm install` for you after the project has been created? 选择 No
进入项目路径:
cd myvue

初始化项目:
npm install

启动项目:
npm run dev

Insert picture description here

Guess you like

Origin blog.csdn.net/BLU_111/article/details/108322692