Skip to content
This repository was archived by the owner on May 7, 2022. It is now read-only.

Commit 1f39ff0

Browse files
committed
文档维护
1 parent 72062f6 commit 1f39ff0

File tree

2 files changed

+70
-20
lines changed

2 files changed

+70
-20
lines changed

README.md

Lines changed: 69 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,18 @@ webpack 打包来实现最佳优化。
1616
```
1717
欢迎 watch、star、fork,因为我自己也是基于这套框架做开发,所以我会长期维护该项目,跟随相关插件的升级而升级优化。
1818

19-
#### 2017.8.22 更新
19+
#### 2017.8.27 更新
2020

2121
1、升级babel到最新稳定版
2222

2323
2、升级webpack到3.5.5
2424

2525
3、更新css和less提取模式,由于webpack开发环境不支持css热更新,所以不单独提取css,而在生成环境下,单独打包css模块。
2626

27+
4、全面优化组件,vendor.js打包体积有所减少,线上开启gzip之后仅有92.1kb,点击上面的链接在线查看
28+
29+
5、完善eslint规则
30+
2731
#### 2017.6.17 更新
2832

2933
1、使用webpack的import()实现代码切割,不只是在路由中使用,你可以在任意组件内部使用代码切割方法懒加载组件,。
@@ -67,23 +71,23 @@ npm install 或者cnpm install
6771
```
6872

6973
2、运行demo。
70-
```
74+
```nodemon
7175
mac
7276
npm run start-mac
7377
7478
windows
7579
npm run start-win
76-
```
80+
```
7781

7882
3、将会开启3011端口.
79-
```
83+
```nodemon
8084
http://localhost:3011
8185
8286
```
8387

8488
4、打包发布: 假设你用的是阿里云服务器,你可以把静态资源和图片都放到CDN,index.html放到你的域名服务器下面,请注意路径问题。
8589

86-
```
90+
```nodemon
8791
mac
8892
npm run build-mac
8993
@@ -93,24 +97,72 @@ npm run build-win
9397

9498
===========================================
9599

96-
#### 压缩效果图
100+
#### 关于DOC文档教程的解释
97101

98-
![image](https://github.com/hyy1115/react-redux-webpack2/blob/master/public/fenxi.png)
102+
非常抱歉的是由于各个插件版本升级太快,一些文档教程没有实时跟上维护修改,如果你有参与项目的意愿,可以帮忙更新DOC教程。
99103

100-
#### 加入我们的组织
101-
102-
![image](https://segmentfault.com/img/bVQYb6?w=564&h=786)
104+
#### 关于react-transition-group的注意事项
103105

104-
#### 参与开源项目的方法(详情可以网上搜索教程)
106+
```text
107+
react-transition-group目前有V1和V2,本项目使用的是V1,如果没有需求,请勿切换到V2,我尝试升级V2,发现过渡动画切换出现了异常。
108+
如果你想升级,那么我可以提供一个简易的代码修改提示。
109+
```
105110

106-
如果你对该项目感兴趣,想共享一份你的力量,请大胆pull request吧!
111+
**升级V2小提示:(不建议升级)**
112+
1、修改css动画class退出属性
113+
```css
114+
.example-leave {
115+
opacity: 1;
116+
}
117+
.example-leave.example-leave-active {
118+
opacity: 0.01;
119+
transition: opacity 300ms ease-in;
120+
}
121+
122+
/*leave 改为 exit*/
123+
124+
.example-exit {
125+
opacity: 1;
126+
}
127+
128+
.example-exit.example-exit-active {
129+
opacity: 0.01;
130+
transition: opacity 300ms ease-in;
131+
}
132+
```
133+
2、CSSTransitionGroup替换成TransitionGroup和CSSTransition,同时修改props
134+
```javascript
135+
import {TransitionGroup, CSSTransition} from 'react-transition-group'
136+
137+
class A extends React.Component {
138+
render() {
139+
return (
140+
<TransitionGroup>
141+
<CSSTransition
142+
key={location.pathname}
143+
classNames={animateCls}
144+
enter={true}
145+
exit={true}
146+
timeout={{exit: 400, enter: 400}}
147+
>
148+
<div>
149+
<Route location={location} exact path="/" component={homeContainer} />
150+
<Route location={location} path="/search" component={Search} />
151+
<Route location={location} path="/bookList/:bookId" component={BookList} />
152+
</div>
153+
</CSSTransition>
154+
</TransitionGroup>
155+
)
156+
}
157+
}
107158

108-
1、点击fork
159+
```
109160

110-
2、去到你fork之后的项目下面
161+
#### 加入我们的组织
162+
**微信群已超过100人,如果你需要加群,请私聊我。**
111163

112-
3、clone到本地
164+
![image](https://segmentfault.com/img/bVQYb6?w=564&h=786)
113165

114-
4、你可以在本地修改、删除、增加,然后commit到本地缓存,接着push到远程。(请注意每次commit尽量做小改动,切勿改了几十个文件全部都commit到一起!
166+
#### 参与开源项目的方法(详情可以网上搜索教程
115167

116-
5、然后,在github桌面客户端pull request你的commit
168+
**如果你对该项目感兴趣,想共享一份你的力量,请大胆pull PR!**

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,12 @@
3434
"compression": "^1.6.2",
3535
"css-loader": "^0.22.0",
3636
"eslint": "^4.5.0",
37-
"eslint-config-airbnb": "^15.1.0",
3837
"eslint-plugin-react": "^7.3.0",
3938
"expect": "^1.12.0",
4039
"express": "^4.15.2",
41-
"extract-text-webpack-plugin": "^2.1.0",
40+
"extract-text-webpack-plugin": "^2.1.2",
4241
"file-loader": "^0.8.4",
4342
"image-webpack-loader": "^3.1.0",
44-
"jasmine-core": "^2.3.4",
4543
"jest": "^19.0.2",
4644
"jest-runtime": "^19.0.2",
4745
"less": "^2.7.1",

0 commit comments

Comments
 (0)