This repository was archived by the owner on Oct 12, 2022. It is now read-only.
File tree 12 files changed +36
-22
lines changed
es6-babel-react-flux-karma
12 files changed +36
-22
lines changed Original file line number Diff line number Diff line change 41
41
"gulp-eslint" : " ^1.0.0" ,
42
42
"gulp-if" : " ^2.0.0" ,
43
43
"gulp-inject" : " ^3.0.0" ,
44
- "gulp-jshint" : " ^1.11.2" ,
45
44
"gulp-notify" : " ^2.2.0" ,
46
45
"gulp-sourcemaps" : " ^1.5.2" ,
47
46
"gulp-streamify" : " 1.0.0" ,
58
57
"karma-sourcemap-loader" : " ^0.3.6" ,
59
58
"karma-webpack" : " ^1.7.0" ,
60
59
"phantomjs" : " ^1.9.17" ,
61
- "react" : " ^0.13 .3" ,
60
+ "react" : " ^0.14 .3" ,
62
61
"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" ,
63
65
"typescript" : " ^1.6.2" ,
64
66
"webpack" : " ^1.12.2" ,
65
67
"webpack-notifier" : " ^1.2.1"
Original file line number Diff line number Diff line change 1
- import * as React from 'react/addons ' ;
1
+ import * as React from 'react' ;
2
2
import GreetingStore from '../stores/GreetingStore' ;
3
3
import * as GreetingActions from '../actions/GreetingActions' ;
4
4
import GreetingState from '../types/GreetingState' ;
Original file line number Diff line number Diff line change 1
- import * as React from 'react/addons ' ;
1
+ import * as React from 'react' ;
2
2
import * as GreetingActions from '../actions/GreetingActions' ;
3
3
4
4
interface Props {
Original file line number Diff line number Diff line change 1
- import * as React from 'react/addons ' ;
1
+ import * as React from 'react' ;
2
2
import * as GreetingActions from '../actions/GreetingActions' ;
3
3
4
4
interface Props {
Original file line number Diff line number Diff line change 1
1
import './dependencies' ;
2
- import * as React from 'react/addons' ;
2
+ import * as React from 'react' ;
3
+ import * as ReactDOM from 'react-dom' ;
3
4
import App from './components/App' ;
5
+ React ; // use React as an expression to prevent React being purged from dependencies as not used directly
4
6
5
- React . render ( < App /> , document . getElementById ( 'content' ) ) ;
7
+ ReactDOM . render ( < App /> , document . getElementById ( 'content' ) ) ;
Original file line number Diff line number Diff line change 3
3
"filesGlob" : [
4
4
" ../typings/**/*.*.ts" ,
5
5
" !../typings/jasmine/jasmine.d.ts" ,
6
+ " !../typings/react/react-addons-test-utils.d.ts" ,
6
7
" **/*.{ts,tsx}"
7
8
],
8
9
"compilerOptions" : {
16
17
"files" : [
17
18
" ../typings/flux/flux.d.ts" ,
18
19
" ../typings/node/node.d.ts" ,
20
+ " ../typings/react/react-dom.d.ts" ,
19
21
" ../typings/react/react.d.ts" ,
20
22
" ../typings/tsd.d.ts" ,
21
23
" actions/GreetingActions.ts" ,
Original file line number Diff line number Diff line change 1
- import * as React from 'react/addons' ;
1
+ import * as React from 'react' ;
2
+ import * as TestUtils from 'react-addons-test-utils' ;
2
3
import App from '../../src/components/App' ;
3
4
import WhoToGreet from '../../src/components/WhoToGreet' ;
4
5
import Greeting from '../../src/components/Greeting' ;
5
6
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
8
8
9
9
describe ( 'App' , ( ) => {
10
10
it ( 'renders expected HTML' , ( ) => {
Original file line number Diff line number Diff line change 1
- import * as React from 'react/addons' ;
1
+ import * as React from 'react' ;
2
+ import * as TestUtils from 'react-addons-test-utils' ;
2
3
import Greeting from '../../src/components/Greeting' ;
3
4
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
6
6
7
7
describe ( 'Greeting' , ( ) => {
8
8
let handleSelectionChangeSpy : jasmine . Spy ;
Original file line number Diff line number Diff line change 1
- import * as React from 'react/addons' ;
1
+ import * as React from 'react' ;
2
+ import * as TestUtils from 'react-addons-test-utils' ;
2
3
import WhoToGreet from '../../src/components/WhoToGreet' ;
3
4
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
6
6
7
7
describe ( 'WhoToGreet' , ( ) => {
8
8
let handleSelectionChangeSpy : jasmine . Spy ;
Original file line number Diff line number Diff line change 22
22
" ../typings/flux/flux.d.ts" ,
23
23
" ../typings/jasmine/jasmine.d.ts" ,
24
24
" ../typings/node/node.d.ts" ,
25
+ " ../typings/react/react-addons-test-utils.d.ts" ,
26
+ " ../typings/react/react-dom.d.ts" ,
25
27
" ../typings/react/react.d.ts" ,
26
28
" ../typings/tsd.d.ts"
27
29
],
Original file line number Diff line number Diff line change 6
6
"bundle" : " typings/tsd.d.ts" ,
7
7
"installed" : {
8
8
"jasmine/jasmine.d.ts" : {
9
- "commit" : " 3191f6e0088eee07c4d8fd24e4d27a40a60d9eb9 "
9
+ "commit" : " fa04c80f4a889613b96cb4f283848c61a9f64233 "
10
10
},
11
11
"flux/flux.d.ts" : {
12
- "commit" : " 3191f6e0088eee07c4d8fd24e4d27a40a60d9eb9 "
12
+ "commit" : " fa04c80f4a889613b96cb4f283848c61a9f64233 "
13
13
},
14
14
"node/node.d.ts" : {
15
- "commit" : " 3191f6e0088eee07c4d8fd24e4d27a40a60d9eb9 "
15
+ "commit" : " fa04c80f4a889613b96cb4f283848c61a9f64233 "
16
16
},
17
17
"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
+ }
20
26
}
21
27
}
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ module.exports = {
9
9
entry : {
10
10
main : './src/main.tsx' ,
11
11
vendor : [
12
- 'react/addons ' ,
12
+ 'react' ,
13
13
'flux' ,
14
14
'events' ,
15
15
'babel/polyfill'
You can’t perform that action at this time.
0 commit comments