1.脚手架的安装
win 10+系统 左下角的任务栏搜索 powersell 右键已管理员身份打开;
或者是win+r 运行cmd
1.安装脚手架:
全局安装cli脚手架:
检查 node版本 node -v
检查 npm 版本 npm -v
不会出现node 或者npm 不是内部或外部命令 证明环境是可以的;
npm install -g @vue/cli (推荐)或者 npm install -g @vue-cli 或者 npm install -g @vue/cli-init
中间加-g的原因 意为全局安装;
判断是否安装成功:
vue --version
2.初始化vue-cli项目:
vue create 文件名(推荐) 或者 vue init webpack 文件名
Please pick a preset: (Use arrow keys) 选择要创建的配置项目 选择第三个
Check the features needed for your project: (Press <space> to select, <a> to toggle all, <i> to invert selection, and
<enter> to proceed) 选择项目所需要的配置 选择 babel Progressive Web App (PWA) Support Router Vuex CSS Pre-processors Linter / Formatter 按数字键选择或者取消选择
Choose a version of Vue.js that you want to start the project with (Use arrow ke