vue-cli(vue脚手架)

vue-cli用于自动生成vue+webpack项目。

安装webpack:npm install webpack -g

检查webpack是否安装成功和版本:webpack -v

如果是webpack 4.x之后版本需要安装webpack-cli依赖

vue-cli全局安装:npm install vue-cli -g

坚持是否安装成功及版本:Vue -V

初始化项目(先进入到项目所在的路径):vue init <template name>  <project name>

      vue init webpack myproject

webpack:表示一个全面的webpack+vue-loader的模板,

在提示处输入对应的信息:

Vue build (Use arrow keys)
Runtime + Compiler: recommended for most users
Runtime-only: about 6KB lighter min+gzip, but templates (or any Vue-specific H

ML) are ONLY allowed in .vue files - render functions are required elsewhere

这里选择Runtime + Compiler

选择cd进入项目文件所在目录

安装npm依赖:npm install 安装所有的npm依赖,如果是安装某一个依赖就是npm install <依赖名>

启动项目:npm run dev

https://blog.csdn.net/wulala_hei/article/details/80488674

https://blog.csdn.net/weixin_40408910/article/details/81279305

https://blog.csdn.net/qq_34320300/article/details/78546141

https://blog.csdn.net/ShaniquaWang/article/details/72859600

猜你喜欢

转载自www.cnblogs.com/Zhengxiaoxiao/p/10533346.html