这是vuejs2.0 demos,共包含四部分 vue-demos、vue-router-demos、vuex-demos 和 vuex-vue-router-demos
首先将这个项目克隆到你的本地
$ git clone https://github.com/huangshuwei/vuejs2.0-demos.git
vue-demos 和 vue-router-demos 找到对应的实例,在浏览器打开即可查看效果;
vuex-demos 实例是和 webpack 结合使用的,需要进行以下安装
全局安装 webpack
$ npm install webpack -g
$ npm install webpack-dev-server -g
项目中安装
$ npm install
执行命令,查看效果
-
生产环境:
$ npm run build
-
开发预览环境:
$ npm run dev
-
热替换模式(实时编译,刷新浏览器):
$ npm run hrm
后面再整理...