Skip to content

Commit ae0c590

Browse files
committed
prettier 自动化工具-格式化代码
1 parent dfd2dba commit ae0c590

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+3624
-2891
lines changed

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"printWidth": 100,
3+
"singleQuote": true,
4+
"trailingComma": "es5"
5+
}

.vscode/launch.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
// 使用 IntelliSense 了解相关属性。
3-
// 悬停以查看现有属性的描述。
4-
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5-
"version": "0.2.0",
6-
"configurations": [
7-
{
8-
"type": "node",
9-
"request": "launch",
10-
"name": "启动程序",
11-
"program": "${workspaceFolder}/start"
12-
}
13-
]
14-
}
2+
// 使用 IntelliSense 了解相关属性。
3+
// 悬停以查看现有属性的描述。
4+
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "启动程序",
11+
"program": "${workspaceFolder}/start"
12+
}
13+
]
14+
}

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
23
# yarn lockfile v1
34

4-
rm ./node_modules/react-native/local-cli/core/__fixtures__/files/package.json
5+
rm ./node_modules/react-native/local-cli/core/**fixtures**/files/package.json
56

67
https://github.com/canyavall/reactcv/blob/f718721a606aca9376165d0712b31f7d066dce73/React%20Lesson%203/intro_redux_middleware.md 素材

README.md

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
11
### 功能集合
2-
- [x] 热更新 code-push
3-
- [x] carousel
4-
- [x] redux 案例
5-
- [x] react-navigation 案例
6-
- [x] Android 硬更新
7-
- [x] iOS 硬更新
8-
- [ ] native 层
2+
3+
* [x] 热更新 code-push
4+
* [x] carousel
5+
* [x] redux 案例
6+
* [x] react-navigation 案例
7+
* [x] Android 硬更新
8+
* [x] iOS 硬更新
9+
* [ ] native 层
910

1011
### 项目架构
11-
- [x] react-native,
12-
- [x] react-navigation,
13-
- [x] redux,
14-
- [x] mobx,
15-
- [x] react-native-vector-icons
16-
- [x] react-native-splash-screen
17-
- [x] react-native-code-push
18-
...
12+
13+
* [x] react-native,
14+
* [x] react-navigation,
15+
* [x] redux,
16+
* [x] mobx,
17+
* [x] react-native-vector-icons
18+
* [x] react-native-splash-screen
19+
* [x] react-native-code-push
20+
...
1921

2022
### 自动化工具
21-
- [x] prettier
23+
24+
* [x] prettier
2225

2326
#### 案例效果图
27+
2428
<center class="half">
2529
<img src="./assets/new_login.jpg" width="300px"/>
2630
<img src="./assets/new_list.jpg" width="300px"/>
@@ -29,16 +33,17 @@
2933

3034
<figure>
3135
<img src="./assets/new_info.jpg" width="300px"/>
32-
</figure>
36+
</figure>
3337

3438
### 快捷地址:
39+
3540
> [immutable doc][immutable]
3641
3742
> [immutable blog][immutable-blog]
3843
3944
> [react-navigation doc][react-navigation]
4045
41-
> [React Native Express ][React-Native-Express]
46+
> [React Native Express ][react-native-express]
4247
4348
> [react-navigation-redux-helpers doc][react-navigation-redux-helpers]
4449
@@ -47,7 +52,8 @@
4752
<img src="./assets/tab-navigator.png"/>
4853

4954
### 介绍 Redux 中间件(Middleware)
50-
还记得Redux的GIF嘛
55+
56+
还记得 Redux 的 GIF 嘛
5157

5258
<img src="./assets/redux.gif" width="550px"/>
5359

@@ -56,24 +62,23 @@
5662
<img src="./assets/change-redux.gif" width="550px"/>
5763

5864
正如你所看到的,这里还有一个概念:Middleware
59-
#### 什么是Middleware
60-
[文档][Middleware]中看到:
65+
66+
#### 什么是 Middleware
67+
68+
[文档][middleware]中看到:
6169

6270
```
6371
It provides a third-party extension point between dispatching an action, and the moment it reaches the reducer
6472
```
6573

66-
简而言之,这是一个函数,在Action到达Reducer之前,将使用Action调用该函数。
67-
68-
在这个功能中,你可以让Action继续前进,你可以阻止它继续前进,或者你可以改变它,并把它发送给下一个。
74+
简而言之,这是一个函数,在 Action 到达 Reducer 之前,将使用 Action 调用该函数。
6975

76+
在这个功能中,你可以让 Action 继续前进,你可以阻止它继续前进,或者你可以改变它,并把它发送给下一个。
7077

71-
[new-nav-redux]:http://blog.csdn.net/qq_33323251/article/details/79430398
78+
[new-nav-redux]: http://blog.csdn.net/qq_33323251/article/details/79430398
7279
[immutable-blog]: https://github.com/camsong/blog/issues/3
73-
[Middleware]: http://redux.js.org/docs/advanced/Middleware.html
80+
[middleware]: http://redux.js.org/docs/advanced/Middleware.html
7481
[immutable]: https://facebook.github.io/immutable-js/docs/#/
7582
[react-navigation]: https://reactnavigation.org/docs/getting-started.html
76-
[React-Native-Express]: http://www.reactnativeexpress.com/
77-
[react-navigation-redux-helpers]:https://github.com/react-navigation/react-navigation-redux-helpers
78-
79-
83+
[react-native-express]: http://www.reactnativeexpress.com/
84+
[react-navigation-redux-helpers]: https://github.com/react-navigation/react-navigation-redux-helpers

__tests__/App.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,5 @@ import App from '../App';
66
import renderer from 'react-test-renderer';
77

88
it('renders correctly', () => {
9-
const tree = renderer.create(
10-
<App />
11-
);
9+
const tree = renderer.create(<App />);
1210
});

app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"name": "AwesomeProject",
33
"displayName": "AwesomeProject"
4-
}
4+
}

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// import './App'
2-
import './src'
2+
import './src';
Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,80 @@
11
{
2-
"images" : [
2+
"images": [
33
{
4-
"size" : "20x20",
5-
"idiom" : "iphone",
6-
"filename" : "NotificationIcon@2x.png",
7-
"scale" : "2x"
4+
"size": "20x20",
5+
"idiom": "iphone",
6+
"filename": "NotificationIcon@2x.png",
7+
"scale": "2x"
88
},
99
{
10-
"size" : "20x20",
11-
"idiom" : "iphone",
12-
"filename" : "NotificationIcon@3x.png",
13-
"scale" : "3x"
10+
"size": "20x20",
11+
"idiom": "iphone",
12+
"filename": "NotificationIcon@3x.png",
13+
"scale": "3x"
1414
},
1515
{
16-
"size" : "29x29",
17-
"idiom" : "iphone",
18-
"filename" : "Icon-Small.png",
19-
"scale" : "1x"
16+
"size": "29x29",
17+
"idiom": "iphone",
18+
"filename": "Icon-Small.png",
19+
"scale": "1x"
2020
},
2121
{
22-
"size" : "29x29",
23-
"idiom" : "iphone",
24-
"filename" : "Icon-Small@2x.png",
25-
"scale" : "2x"
22+
"size": "29x29",
23+
"idiom": "iphone",
24+
"filename": "Icon-Small@2x.png",
25+
"scale": "2x"
2626
},
2727
{
28-
"size" : "29x29",
29-
"idiom" : "iphone",
30-
"filename" : "Icon-Small@3x.png",
31-
"scale" : "3x"
28+
"size": "29x29",
29+
"idiom": "iphone",
30+
"filename": "Icon-Small@3x.png",
31+
"scale": "3x"
3232
},
3333
{
34-
"size" : "40x40",
35-
"idiom" : "iphone",
36-
"filename" : "Icon-40@2x.png",
37-
"scale" : "2x"
34+
"size": "40x40",
35+
"idiom": "iphone",
36+
"filename": "Icon-40@2x.png",
37+
"scale": "2x"
3838
},
3939
{
40-
"size" : "40x40",
41-
"idiom" : "iphone",
42-
"filename" : "Icon-40@3x.png",
43-
"scale" : "3x"
40+
"size": "40x40",
41+
"idiom": "iphone",
42+
"filename": "Icon-40@3x.png",
43+
"scale": "3x"
4444
},
4545
{
46-
"size" : "57x57",
47-
"idiom" : "iphone",
48-
"filename" : "Icon.png",
49-
"scale" : "1x"
46+
"size": "57x57",
47+
"idiom": "iphone",
48+
"filename": "Icon.png",
49+
"scale": "1x"
5050
},
5151
{
52-
"size" : "57x57",
53-
"idiom" : "iphone",
54-
"filename" : "Icon@2x.png",
55-
"scale" : "2x"
52+
"size": "57x57",
53+
"idiom": "iphone",
54+
"filename": "Icon@2x.png",
55+
"scale": "2x"
5656
},
5757
{
58-
"size" : "60x60",
59-
"idiom" : "iphone",
60-
"filename" : "Icon-60@2x.png",
61-
"scale" : "2x"
58+
"size": "60x60",
59+
"idiom": "iphone",
60+
"filename": "Icon-60@2x.png",
61+
"scale": "2x"
6262
},
6363
{
64-
"size" : "60x60",
65-
"idiom" : "iphone",
66-
"filename" : "Icon-60@3x.png",
67-
"scale" : "3x"
64+
"size": "60x60",
65+
"idiom": "iphone",
66+
"filename": "Icon-60@3x.png",
67+
"scale": "3x"
6868
},
6969
{
70-
"size" : "1024x1024",
71-
"idiom" : "ios-marketing",
72-
"filename" : "ios-marketing-1.png",
73-
"scale" : "1x"
70+
"size": "1024x1024",
71+
"idiom": "ios-marketing",
72+
"filename": "ios-marketing-1.png",
73+
"scale": "1x"
7474
}
7575
],
76-
"info" : {
77-
"version" : 1,
78-
"author" : "xcode"
76+
"info": {
77+
"version": 1,
78+
"author": "xcode"
7979
}
80-
}
80+
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"info" : {
3-
"version" : 1,
4-
"author" : "xcode"
2+
"info": {
3+
"version": 1,
4+
"author": "xcode"
55
}
6-
}
6+
}

0 commit comments

Comments
 (0)