1
- [ ![ Create React Redux App] ( readme/cover.png )] ( https://yingray.github.io/create-react-redux-app/ )
1
+ # [ ![ Create React Redux App] ( readme/cover.png )] ( https://yingray.github.io/create-react-redux-app/ )
2
2
3
3
[ ![ Build Status] ( https://travis-ci.org/yingray/create-react-redux-app.svg?branch=master )] ( https://travis-ci.org/yingray/create-react-redux-app )
4
4
[ ![ Coverage Status] ( https://coveralls.io/repos/github/yingray/create-react-redux-app/badge.svg?branch=master )] ( https://coveralls.io/github/yingray/create-react-redux-app?branch=master )
5
5
6
- # We will have the new structure for REDUX soon! (Sep. 2017)
6
+ This project was bootstrapped with Create React App and Redux, Sass Structure.
7
7
8
- This project was bootstrapped with Create React App and Redux Structure.
8
+ # Todo List
9
9
10
- Todo List (Redux):
10
+ * react + redux sample practice
11
11
12
12
![ demo] ( readme/demo.gif )
13
13
14
- API (fetch):
14
+ # fetch API
15
+
16
+ * Handle async event
17
+
18
+ * async/await + api-book sample practice
15
19
16
20
![ demo-api] ( readme/demo-api.gif )
17
21
22
+ # Getting Started
18
23
19
24
## Dependencies
20
25
21
26
* React
22
- * react
23
- * react-dom
27
+ * react
28
+ * react-dom
24
29
25
30
* Create React App
26
- * react-scripts
31
+ * react-scripts
27
32
28
33
* Redux
29
- * redux
30
- * react-redux
31
- * react-router
32
- * react-router-redux
33
- * redux-thunk
34
-
34
+ * redux
35
+ * react-redux
36
+ * react-router
37
+ * react-router-redux
38
+ * redux-thunk
39
+
40
+ * Sass
41
+ * node-sass-chokidar
42
+
35
43
* Fetch
36
- * babel-polyfill
37
- * isomorphic-fetch
44
+ * api-book
45
+ * babel-polyfill
38
46
39
47
* Github Deployment Tool
40
48
* gh-pages
41
49
42
- ## Getting Started
43
-
44
- ### Installation
50
+ ## Installation
45
51
46
- To create a new react-redux app, run:
52
+ To create a new react-redux-sass app, run:
47
53
48
54
``` sh
49
55
git clone https://github.com/yingray/create-react-redux-app.git ~ /create-react-redux-app
50
56
cd ~ /create-react-redux-app
51
- npm install
57
+ # yarn or npm install
58
+ yarn
52
59
```
53
60
54
61
It will create a directory called ** create-react-redux-app** inside the current folder.
@@ -58,63 +65,84 @@ Inside that directory, it will generate the initial project structure and instal
58
65
create-react-redux-app/
59
66
src/
60
67
actions/
61
- index.js
68
+ todoActions.js
69
+ weatherActions.js
62
70
components/
63
- HomePage.js
64
- Card.js
65
- TodoFooter.js
66
- Link.js
67
- Todo.js
68
- TodoList.js
71
+ App.js
72
+ Header.js
73
+ Link.js
74
+ Navigation.js
75
+ Todo.js
76
+ TodoFooter.js
77
+ TodoList.js
69
78
constants/
70
- ActionTypes.js
79
+ ActionTypes.js
71
80
containers/
72
- AddTodo.js
73
- HomePage .js
74
- FilterLink .js
75
- VisibleTodoList .js
81
+ AddTodo.js
82
+ FilterLink .js
83
+ VisibleTodoList .js
84
+ Weather .js
76
85
images/
77
- logo.svg
86
+ logo.svg
87
+ pages/
88
+ Home.js
89
+ Todo.js
90
+ Weather.js
78
91
reducers/
79
- index.js
80
- todos.js
81
- visibilityFilter.js
92
+ todos.js
93
+ visibilityFilter.js
94
+ weatherReducer.js
95
+ services/
96
+ weatherApi.js
82
97
styles/
83
- App.css
84
- index.css
98
+ base/
99
+ components/
100
+ config/
101
+ layout/
102
+ pages/
103
+ utils/
104
+ vendors/
105
+ main.scss
85
106
index.js
86
- test/
87
- App.spec.js
88
-
107
+ registerServiceWorker.js
108
+ routes.js
109
+ store.js
110
+ --
111
+ tests/
112
+ components/
113
+ App.spec.js
114
+ reducers/
115
+ weatherReducer.spec.js
89
116
--
90
- README.md
91
- node_modules/
92
- package.json
93
- .gitignore
94
117
public/
95
118
favicon.ico
96
119
index.html
120
+ --
121
+ node_modules/
122
+ .editorconfig
123
+ package.json
124
+ README.md
97
125
```
98
126
99
- ### Runs the app in development mode:
127
+ ### Runs the app in development mode
100
128
101
- ```
129
+ ``` bash
102
130
npm start
103
131
```
104
132
105
- Open http://localhost:3000 to view it in the browser.
133
+ Open ` http://localhost:3000 ` to view it in the browser.
106
134
107
- ### Runs the test watcher in an interactive mode:
135
+ ### Runs the test watcher in an interactive mode
108
136
109
- ```
137
+ ``` bash
110
138
npm test
111
139
```
112
140
113
141
By default, runs tests related to files changes since the last commit.
114
142
115
143
### Builds the app for production to the build folder:
116
144
117
- ```
145
+ ``` bash
118
146
npm run build
119
147
```
120
148
@@ -124,18 +152,20 @@ Your app is ready to be deployed!
124
152
125
153
Reference: https://github.com/facebookincubator/create-react-app
126
154
127
- ### Deploys the production to github.io page:
155
+ ### Deploys the production to github.io page
128
156
129
157
Changes package.json
130
-
131
- ```
158
+
159
+ ``` js
132
160
" homepage" : " http://{account_name}.github.io/{project_name}" ,
161
+ " scripts" : {
162
+ " predeploy" : " npm run build"
163
+ }
133
164
```
134
165
135
166
And runs
136
167
137
- ```
138
- npm run build
168
+ ``` bash
139
169
npm run deploy
140
170
```
141
171
0 commit comments