Vue-cli的安装和项目构建

全局安装cli工具:

npm install cnpm -g --registry=https://registry.npm.taobao.org  //安装cnpm
cnpm install -g vue-cli    //安装cli
查看安装:vue --version

构建项目:vue init webpack vue_project
Vue-cli的安装和项目构建_第1张图片

Project name weixin //项目名称 ? Project description
项目描述 //项目描述 ? Author //作者非必填 ? Vue build
standalone ? Install vue-router? Yes //是否安装路由,一般选择yes ?
Use ESLint to lint your code? Yes //用ESLint检查代码,可以选n。idea中有检测的 ?
Pick an ESLint preset Standard //选择一个ESLint的版本 ? Set up
unit tests Yes //安装测试工具 ? Pick a test runner jest ?
Setup e2e tests with Nightwatch? n //测试相关工具 ? Should we run
npm install for you after the project has been created? 选择:No,

之后安装npm :npm install
启动项目; npm run dev 

然后全部结束,这是你安装完之后获得的框架包,看一下结构↓

Vue-cli的安装和项目构建_第2张图片

你可能感兴趣的:(计算机,vue,npm,java,vue.js,javascript)