Skip to content

Commit 7fed155

Browse files
committed
Fixes & additional tools
Fixes Hot Module Reloading in the standard client / server setup, and enhances its integration with the server-side rendering. Moves in redux and meta tags. Version bumped to 0.3.3
1 parent 63efb95 commit 7fed155

File tree

14 files changed

+460
-23
lines changed

14 files changed

+460
-23
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ only need to call `adopt-dev-deps` again if you update
7171
with isomorphic aspects of the code;
7272
- [**Jest utils**](docs/jest-utils.md) — Collection of helpers to be used
7373
in Jest tests code;
74+
- [**Redux utils**](docs/redux-utils.md) — *TO BE DOCUMENTED*
7475
- [**SCSS Mixins**](docs/scss-mixins.md) — Collection of useful style
7576
mixins;
7677
- [**Server**](docs/server.md) — Easy creation and launch of web-server

__tests__/__snapshots__/index.js.snap

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ exports[`Export at client side 1`] = `
44
Object {
55
"Avatar": [Function],
66
"Button": [Function],
7+
"DevTools": [Function],
78
"JU": null,
89
"Link": [Function],
10+
"MetaTags": [Function],
911
"NavLink": [Function],
1012
"ScalableRect": [Function],
1113
"client": [Function],
@@ -17,6 +19,13 @@ Object {
1719
"isProdBuild": [Function],
1820
"isServerSide": [Function],
1921
},
22+
"redux": Object {
23+
"combineReducers": [Function],
24+
"handleActions": [Function],
25+
"resolveAction": [Function],
26+
"resolveReducers": [Function],
27+
"storeFactory": [Function],
28+
},
2029
"server": null,
2130
"webpack": Object {
2231
"default": undefined,
@@ -29,6 +38,7 @@ exports[`Export at server side 1`] = `
2938
Object {
3039
"Avatar": [Function],
3140
"Button": [Function],
41+
"DevTools": [Function],
3242
"JU": Object {
3343
"findInDomByClass": [Function],
3444
"findInDomManyByClass": [Function],
@@ -114,6 +124,7 @@ Object {
114124
"snapshot": [Function],
115125
},
116126
"Link": [Function],
127+
"MetaTags": [Function],
117128
"NavLink": [Function],
118129
"ScalableRect": [Function],
119130
"client": [Function],
@@ -130,6 +141,13 @@ Object {
130141
"isProdBuild": [Function],
131142
"isServerSide": [Function],
132143
},
144+
"redux": Object {
145+
"combineReducers": [Function],
146+
"handleActions": [Function],
147+
"resolveAction": [Function],
148+
"resolveReducers": [Function],
149+
"storeFactory": [Function],
150+
},
133151
"server": [Function],
134152
"webpack": Object {
135153
"default": undefined,

__tests__/shared/utils/isomorphy.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ test('Dev mode detection - client side', () => {
3232
});
3333

3434
test('Dev mode detection - server side', () => {
35-
process.env.BABEL_ENV = 'development';
35+
global.TRU_BUILD_INFO = { mode: 'development' };
3636
expect(m().isDevBuild()).toBe(true);
3737
expect(m().isProdBuild()).toBe(false);
38-
delete process.env.BABEL_ENV;
3938
});
4039

4140
test('Prod mode - client side', () => {
@@ -46,10 +45,9 @@ test('Prod mode - client side', () => {
4645
});
4746

4847
test('Prod mode - server side', () => {
49-
process.env.BABEL_ENV = 'production';
48+
global.TRU_BUILD_INFO = { mode: 'production' };
5049
expect(m().isDevBuild()).toBe(false);
5150
expect(m().isProdBuild()).toBe(true);
52-
delete process.env.BABEL_ENV;
5351
});
5452

5553
test('Build timestamp - client-side', () => {

config/webpack/lib-base.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,16 @@ module.exports = function configFactory(ops) {
4242
'react',
4343
'react-css-super-themr',
4444
'react-dom',
45+
'react-helmet',
46+
'react-redux',
4547
'react-router-dom',
48+
'redux',
49+
'redux-actions',
50+
'redux-devtools',
51+
'redux-devtools-dock-monitor',
52+
'redux-devtools-log-monitor',
53+
'redux-promise',
54+
'shortid',
4655
'topcoder-react-utils',
4756
'url-parse',
4857
],

docs/redux-utils.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Redux Utils
2+
3+
*TO BE DOCUMENTED*

0 commit comments

Comments
 (0)