vue-cli安装步骤
1.安装node。
2.win+r 打开输入cmd运行。
3.npm install -g vue-cli (安装vue-cli),
建议先安装cnpm:
npm install -g cnpm --registry=https://registry.npm.taobao.org,
然后用cnpm install -g vue-cli安装,这样速度快点。
4.vue init webpack firstVue (使用webpack模板起个名字,此处firstVue是可以随意起的)。
5.此时会弹出命令 ?Project name (firstVue) 项目名称。
6. ?Project description(A vue.js project) (此处是添加项目描述)。
7. ?Author (***) (作者名称)。
8. ?Use Eslint to lint your code (Y/N) (是否使用eslint的代码风格检查器)。
9. ?should we run "npm install" for you after the project has been created? 选择yes,use NPM
10. 安装玩npm后如图,提示我们可以cd vue.02文件夹,执行npm run dev命令,如此,我们就不用再自己输入 npm install命令来安装所需的包了