• Stars
    star
    513
  • Rank 86,178 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Demo SPA developed with React, ES6, Webpack (2.x), and Antd (1.0.1) 【move to react-seed】

Target

使用React技术栈开发SPA.

Tech Stack

  • UI库:React & React-Dom
  • UI组件:Antd
  • 路由:React-Router & History
  • 框架:Reflux
  • JS:ES6
  • 样式:Less
  • 图标:Antd自带/FontAwesome
  • 动画:Animate.css
  • 与后台通信:Fetch/Ajax
  • 日期处理:Moment
  • 假数据模拟:MockJS
  • 打包构建:Babel Webpack
  • 包管理:Npm & Yarn

Features

  • 自主配置开发环境
  • 支持ES6
  • React-Router配置路由
  • Less代替Css
  • Fetch代替Ajax
  • MockJs模拟数据
  • AnimateCSS提供动画效果
  • 支持jQuery
  • 支持浏览器自动刷新

Usage

1、安装依赖:$ yarn install
2、启动服务:$ npm start
3、生成文件:$ npm run build

Articles

Diary(填坑日志)

1、如果引入FontAwesome,会严重增加编译后的CSS文件体积
2、通过定义Vendors,可以抽取出第三方库文件,避免所有js文件打包在一起
3、通过安装babel-plugin-import插件,可以自动抽离用到的ant组件
4、路由的history配置,如果配置成browserHistory,服务器端也需要做相应的配置
5、路由的history配置,如果配置成hashHistory,则url地址里会有难看的后缀
6、编译静态文件的webpack配置中,插件项目需要设置成生产环境NODE_ENV:JSON.stringify("production")
7、实现路由的跳转,页面内的导航,请使用history(自行Github之),这绝壁是个大坑!
8、本项目使用的是antd 1.x版本,想升级到最新版本(2.x),结果需要改动的地方实在太多,于是放弃
9、本项目由于很久以前开发的,导致服务启动后控制台会有大量Warnnings
10、现在使用yarn管理版本,避免了版本冲突,请使用yarn命令安装卸载依赖包:yarn add|remove packages

License

MIT

More Repositories

1

vue-seed

a boilerplate for large vue project with ElementUI 2.x
JavaScript
581
star
2

react-seed

a Starter-Kit for React-ES6-Webpack(2.x) Project
JavaScript
123
star
3

suanban

A web app developed with Vue2.0 and Douban API
JavaScript
60
star
4

webpack-starter-kit

a starter kit for building SPA with Webpack(2.x)
JavaScript
44
star
5

vue-have-done

A web app developed with Vue2.0 and Element Components
JavaScript
16
star
6

vue-starter

a vue admin template built for front-end developers
Vue
15
star
7

node-lab

creating little funny things with node.js
JavaScript
8
star
8

heatmap

generate a heatmap with Baidu Map API
HTML
6
star
9

node-spider

get ssr qr code with node.js, just for study purpose
JavaScript
5
star
10

ngApp

a SPA with Angular(1.x), RequireJs, Highcharts, and AngularUI
JavaScript
5
star
11

Grocery

a collection of simple demos of Canvas
CSS
4
star
12

gulp-starter-kit

a starter kit for developing SPA with Npm & Gulp
JavaScript
3
star
13

baipress

a technical documentation for FE developers with VuePresss
JavaScript
3
star
14

interview-questions

interview questions for front-end developers
3
star
15

vue-seeds

a boilerplate for vue multi-page project
Vue
2
star
16

ngForm

Form & Tabel with AngularJs
HTML
2
star
17

keeper

record your daily life everyday
JavaScript
2
star
18

lego

Create a page by dragging and drop
Vue
2
star
19

json-preview

preview your mock json data online
HTML
2
star
20

xball

a small h5 game
Vue
2
star
21

vue-egg-mysql

practise egg and mysql
JavaScript
1
star
22

shaker

抖一抖
Vue
1
star
23

electron-vue-starter

a template with vue & electron
JavaScript
1
star
24

vite-starter

a vue template powered by vite
Vue
1
star
25

cube

three 3d cubes developed with three.js
JavaScript
1
star
26

b-danmakus

get danmakus from Bilibili's video
JavaScript
1
star
27

theme-starter

a vue-element template that can change theme colors
Vue
1
star