2、通过 vue-cli 构建 vue 项目
命令vue init webpack one
解释
vue init webpack one
vue-cli的使用命令 初始化 前端自动化工具(模版) 项目名
? Project name 项目名 --- 回车
? Project description 项目描述 --- 回车
? Author 作者 --- 回车
? Vue build 选择第一个 --- 回车
? Install vue-router? vue 路由 y / --- 回车
? Use ESLint to lint your code? 代码风格检测 n --- 回车
? Set up unit tests No 测试 n --- 回车
? Setup e2e tests with Nightwatch? 测试 n --- 回车
? Should we run `npm install` for you after the project has been created? (recommended)
Yes, use NPM 使用npm 去安装项目依赖
Yes, use Yarn 使用 yarn 去安装项目依赖
❯ No, I will handle that myself 使用自己的方式安装 (cnpm)
cd 项目名 进入项目目录
npm install (or if using yarn: yarn) 安装命令 cnpm install
npm run dev 运行命令