Mac/Linux下搭建Vue项目
1.安装NodeJS
2.更改npm源
# 第一种方法
$ npm config set registry https://registry.npm.taobao.org
# 查看npm基本配置信息,验证是否生效
$ npm config list
# 第二种方法,该方法可以用cnpm来替代npm命令
$ npm install -g cnpm -registry=https://registry.npm.taobao.org
3.安装Vue脚手架
# install vue-cli
$ npm install --global vue-cli
# create a new project using the "webpack" template
$ vue init webpack testvue
# install dependencies and go!
$ cd TestVue
$ npm install
$ npm run dev
浏览器输入http://127.0.0.1:8080,完成。