Vue02_第一个vue-cli项目

Vue02_第一个vue-cli项目


  • nodejs 的下载和安装

官网下载(选择windows64位的版本):http://nodejs.cn/download/

安装:无脑下一步

测试是否安装成功:
在这里插入图片描述
安装淘宝镜像:

npm install cnpm -g

使用淘宝镜像安装 vue-cli:

cnpm install vue-cli -g

全局安装的路径:

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

  • 创建 vue-cli 项目:
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

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/BLU_111/article/details/108322692