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

Commit 488d8ea

Browse files
committed
Merge pull request #63 from johnnyreilly/master
Migrated to React 0.14.3
2 parents 1e04e6f + e78f5f3 commit 488d8ea

File tree

12 files changed

+36
-22
lines changed

12 files changed

+36
-22
lines changed

es6-babel-react-flux-karma/package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"gulp-eslint": "^1.0.0",
4242
"gulp-if": "^2.0.0",
4343
"gulp-inject": "^3.0.0",
44-
"gulp-jshint": "^1.11.2",
4544
"gulp-notify": "^2.2.0",
4645
"gulp-sourcemaps": "^1.5.2",
4746
"gulp-streamify": "1.0.0",
@@ -58,8 +57,11 @@
5857
"karma-sourcemap-loader": "^0.3.6",
5958
"karma-webpack": "^1.7.0",
6059
"phantomjs": "^1.9.17",
61-
"react": "^0.13.3",
60+
"react": "^0.14.3",
6261
"ts-loader": "^0.6.0",
62+
"react-addons-test-utils": "^0.14.3",
63+
"react-dom": "^0.14.3",
64+
"ts-loader": "^0.7.1",
6365
"typescript": "^1.6.2",
6466
"webpack": "^1.12.2",
6567
"webpack-notifier": "^1.2.1"

es6-babel-react-flux-karma/src/components/App.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as React from 'react/addons';
1+
import * as React from 'react';
22
import GreetingStore from '../stores/GreetingStore';
33
import * as GreetingActions from '../actions/GreetingActions';
44
import GreetingState from '../types/GreetingState';

es6-babel-react-flux-karma/src/components/Greeting.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as React from 'react/addons';
1+
import * as React from 'react';
22
import * as GreetingActions from '../actions/GreetingActions';
33

44
interface Props {

es6-babel-react-flux-karma/src/components/WhoToGreet.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as React from 'react/addons';
1+
import * as React from 'react';
22
import * as GreetingActions from '../actions/GreetingActions';
33

44
interface Props {
+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import './dependencies';
2-
import * as React from 'react/addons';
2+
import * as React from 'react';
3+
import * as ReactDOM from 'react-dom';
34
import App from './components/App';
5+
React; // use React as an expression to prevent React being purged from dependencies as not used directly
46

5-
React.render(<App />, document.getElementById('content'));
7+
ReactDOM.render(<App />, document.getElementById('content'));

es6-babel-react-flux-karma/src/tsconfig.json

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"filesGlob": [
44
"../typings/**/*.*.ts",
55
"!../typings/jasmine/jasmine.d.ts",
6+
"!../typings/react/react-addons-test-utils.d.ts",
67
"**/*.{ts,tsx}"
78
],
89
"compilerOptions": {
@@ -16,6 +17,7 @@
1617
"files": [
1718
"../typings/flux/flux.d.ts",
1819
"../typings/node/node.d.ts",
20+
"../typings/react/react-dom.d.ts",
1921
"../typings/react/react.d.ts",
2022
"../typings/tsd.d.ts",
2123
"actions/GreetingActions.ts",

es6-babel-react-flux-karma/test/components/App.tests.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import * as React from 'react/addons';
1+
import * as React from 'react';
2+
import * as TestUtils from 'react-addons-test-utils';
23
import App from '../../src/components/App';
34
import WhoToGreet from '../../src/components/WhoToGreet';
45
import Greeting from '../../src/components/Greeting';
56
import GreetingStore from '../../src/stores/GreetingStore';
6-
7-
const { TestUtils } = React.addons;
7+
React; // use React as an expression to prevent React being purged from dependencies as not used directly
88

99
describe('App', () => {
1010
it('renders expected HTML', () => {

es6-babel-react-flux-karma/test/components/Greeting.tests.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import * as React from 'react/addons';
1+
import * as React from 'react';
2+
import * as TestUtils from 'react-addons-test-utils';
23
import Greeting from '../../src/components/Greeting';
34
import * as GreetingActions from '../../src/actions/GreetingActions';
4-
5-
const { TestUtils } = React.addons;
5+
React; // use React as an expression to prevent React being purged from dependencies as not used directly
66

77
describe('Greeting', () => {
88
let handleSelectionChangeSpy: jasmine.Spy;

es6-babel-react-flux-karma/test/components/WhoToGreet.tests.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import * as React from 'react/addons';
1+
import * as React from 'react';
2+
import * as TestUtils from 'react-addons-test-utils';
23
import WhoToGreet from '../../src/components/WhoToGreet';
34
import * as GreetingActions from '../../src/actions/GreetingActions';
4-
5-
const { TestUtils } = React.addons;
5+
React; // use React as an expression to prevent React being purged from dependencies as not used directly
66

77
describe('WhoToGreet', () => {
88
let handleSelectionChangeSpy: jasmine.Spy;

es6-babel-react-flux-karma/test/tsconfig.json

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
"../typings/flux/flux.d.ts",
2323
"../typings/jasmine/jasmine.d.ts",
2424
"../typings/node/node.d.ts",
25+
"../typings/react/react-addons-test-utils.d.ts",
26+
"../typings/react/react-dom.d.ts",
2527
"../typings/react/react.d.ts",
2628
"../typings/tsd.d.ts"
2729
],

es6-babel-react-flux-karma/tsd.json

+11-5
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,22 @@
66
"bundle": "typings/tsd.d.ts",
77
"installed": {
88
"jasmine/jasmine.d.ts": {
9-
"commit": "3191f6e0088eee07c4d8fd24e4d27a40a60d9eb9"
9+
"commit": "fa04c80f4a889613b96cb4f283848c61a9f64233"
1010
},
1111
"flux/flux.d.ts": {
12-
"commit": "3191f6e0088eee07c4d8fd24e4d27a40a60d9eb9"
12+
"commit": "fa04c80f4a889613b96cb4f283848c61a9f64233"
1313
},
1414
"node/node.d.ts": {
15-
"commit": "3191f6e0088eee07c4d8fd24e4d27a40a60d9eb9"
15+
"commit": "fa04c80f4a889613b96cb4f283848c61a9f64233"
1616
},
1717
"react/react.d.ts": {
18-
"commit": "3191f6e0088eee07c4d8fd24e4d27a40a60d9eb9"
19-
}
18+
"commit": "fa04c80f4a889613b96cb4f283848c61a9f64233"
19+
},
20+
"react/react-dom.d.ts": {
21+
"commit": "fa04c80f4a889613b96cb4f283848c61a9f64233"
22+
},
23+
"react/react-addons-test-utils.d.ts": {
24+
"commit": "fa04c80f4a889613b96cb4f283848c61a9f64233"
25+
}
2026
}
2127
}

es6-babel-react-flux-karma/webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = {
99
entry: {
1010
main: './src/main.tsx',
1111
vendor: [
12-
'react/addons',
12+
'react',
1313
'flux',
1414
'events',
1515
'babel/polyfill'

0 commit comments

Comments
 (0)