|
1 |
| -# v2ex-vue |
| 1 | +# cnode-vue |
2 | 2 |
|
3 |
| -> A Vue.js project |
4 |
| -
|
5 |
| -## Build Setup |
6 |
| - |
7 |
| -``` bash |
8 |
| -# install dependencies |
9 |
| -npm install |
10 |
| - |
11 |
| -# serve with hot reload at localhost:8080 |
12 |
| -npm run dev |
13 |
| - |
14 |
| -# build for production with minification |
15 |
| -npm run build |
| 3 | +### 技术栈 |
| 4 | +``` |
| 5 | +基于vue2 + vue-router + ES6 + less + axios + vuex 重写PC版cnode社区,基于webpack打包 |
| 6 | +``` |
| 7 | +>查看[demo](https://chenbeta.github.io/cnode-view/) |
16 | 8 |
|
17 |
| -# build for production and view the bundle analyzer report |
18 |
| -npm run build --report |
| 9 | +### 安装 |
| 10 | +``` |
| 11 | +1.克隆项目: git clone https://github.com/chenbeta/cnode-vue.git |
| 12 | +2.安装依赖: npm i (or yarn) |
| 13 | +3.启动服务: npm run dev (or yarn run dev) |
| 14 | +4.发布代码: npm run build (or yarn run build) |
19 | 15 | ```
|
20 | 16 |
|
21 |
| -For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). |
| 17 | +### 项目目录说明 |
| 18 | +``` |
| 19 | +. |
| 20 | +|-- src // 源码目录 |
| 21 | +| |-- api // API调用 |
| 22 | +| |-- api.js // api调用与请求拦截 |
| 23 | +| |-- components // 公共组件 |
| 24 | +| |-- headerBox.vue // 页面头部组件 |
| 25 | +| |-- infoBox.vue // 右侧展示组件 |
| 26 | +| |-- listItemBox.vue // 主题列表展示组件 |
| 27 | +| |-- msgList.vue // 消息展示组件 |
| 28 | +| |-- pagination.vue // 分页组件 |
| 29 | +| |-- img // 公共图片 |
| 30 | +| |-- router // 路由 |
| 31 | +| |-- index.js // 路由配置和拦截 |
| 32 | +| |-- style // 样式文件 |
| 33 | +| |-- common.less // 全局通用css文件 |
| 34 | +| |-- markdown.css // md显示样式 |
| 35 | +| |-- util // 公共方法 |
| 36 | +| |-- common.js // 公共JS方法 |
| 37 | +| |-- view // page |
| 38 | +| |-- articleDetails // 详情页面 |
| 39 | +| |-- index // 主页列表 |
| 40 | +| |-- login // 登录页面 |
| 41 | +| |-- msg // 消息页面 |
| 42 | +| |-- newTopic // 创建新主题 |
| 43 | +| |-- user // 用户详情页面 |
| 44 | +| |-- vuex // vuex的状态管理 |
| 45 | + |-- modules // 各种store模块 |
| 46 | +| |-- store.js // 加载各种store模块 |
| 47 | +| |-- types.js // 定义各种type |
| 48 | +| |-- App.vue // 页面入口文件 |
| 49 | +| |-- main.js // 程序入口文件,加载各种公共组件 |
| 50 | +|-- index.html // 页面模板 |
| 51 | +... |
| 52 | +``` |
0 commit comments