声明: 代码源于 黄轶老师在慕课网上的教学视频,我自己用vue2.0重写了项目,喜欢的同学可以去支持老师的课程:http://coding.imooc.com/class/74.html
演示地址:https://colinscales.github.io/scale
## 依赖工具: - vue-cli - webpack - stylus - axios - vue-router - express - better-scroll
1、安装node:http://nodejs.cn/download/ git:https://git-scm.com/downloads
2、从我的仓库复制代码:
$ git clone https://github.com/ColinScales/shell
3、安装vue脚手架工具vue-cli:
$npm install vue-cli -g
4、进入代码根目录安装依赖:
$ npm install --save-dev
5、运行命令:
$ npm run dev
6、发布代码:
$ npm run build
发布完代码后会生成dist目录,保存着项目的所有可运行的代码。
注意不能直接打开index.html运行,需要开启http server运行代码。 直接运行我写好的配置文件就可以运行代码:
$ node prod.server.js
打开浏览器输入localhost:4444看效果。
