vue2.0搭建

1 安装nodejs

2 安装cnpm(淘宝国内加速)
npm install -g cnpm --registry=https://registry.npm.taobao.org

3 全局安装webpack
cnpm install webpack -g

4 安装vue工具包
cnpm install vue-cli -g

4 创建项目
vue init webpack 工程名字<工程名字不能用中文>

 会有一些初始化的设置,如下输入:

 Target directory exists. Continue? (Y/n)直接回车默认(然后会下载 vue2.0模板,这里可能需要连代理)

 Project name (vue-test)直接回车默认
 Project description (A Vue.js project) 直接回车默认

 Author 写你自己的名字
 Use sass 大家可以根据自己的需求选择yes or no


5 添加依赖
cnpm install

6 启动项目
npm run dev

7 打包
npm run build
 

猜你喜欢

转载自blog.csdn.net/qq_24241631/article/details/87192964