File tree 5 files changed +19
-45
lines changed
5 files changed +19
-45
lines changed Original file line number Diff line number Diff line change 8
8
"build" : " react-scripts build"
9
9
},
10
10
"dependencies" : {
11
- "react" : " ^16.8.6 " ,
12
- "react-dom" : " ^16.8.6 " ,
13
- "react-intl" : " ^2.8 .0" ,
11
+ "react" : " ^16.12.0 " ,
12
+ "react-dom" : " ^16.12.0 " ,
13
+ "react-intl" : " ^3.6 .0" ,
14
14
"react-intl-redux" : " file:../.." ,
15
- "react-redux" : " ^7.0.2 " ,
16
- "react-scripts" : " 2.1.8 " ,
17
- "redux" : " ^4.0.1 "
15
+ "react-redux" : " ^7.1.3 " ,
16
+ "react-scripts" : " 3.2.0 " ,
17
+ "redux" : " ^4.0.4 "
18
18
},
19
19
"devDependencies" : {
20
- "del-cli" : " ^1.1 .0"
20
+ "del-cli" : " ^3.0 .0"
21
21
}
22
22
}
Original file line number Diff line number Diff line change 1
1
/* globals document */
2
- import { addLocaleData , FormattedMessage } from 'react-intl'
2
+ import { FormattedMessage } from 'react-intl'
3
3
import { createStore , combineReducers } from 'redux'
4
4
import { IntlProvider , intlReducer } from 'react-intl-redux'
5
5
import { Provider } from 'react-redux'
6
- import itLocaleData from 'react-intl/locale-data/it'
7
- import zhLocaleData from 'react-intl/locale-data/zh'
8
6
import React from 'react'
9
7
import ReactDOM from 'react-dom'
10
8
11
- addLocaleData ( [ ...itLocaleData , ...zhLocaleData ] )
12
-
13
9
const reducer = combineReducers ( {
14
- intl : intlReducer ,
10
+ intl : intlReducer
15
11
} )
16
12
const initialState = {
17
13
intl : {
18
14
defaultLocale : 'zh' ,
19
15
locale : 'it' ,
20
16
messages : {
21
- 'app.greeting' : 'Ciao!' ,
22
- } ,
23
- } ,
17
+ 'app.greeting' : 'Ciao!'
18
+ }
19
+ }
24
20
}
25
21
const store = createStore ( reducer , initialState )
26
22
Original file line number Diff line number Diff line change 10
10
"dependencies" : {
11
11
"intl" : " ^1.2.5" ,
12
12
"prop-types" : " ^15.7.2" ,
13
- "react" : " ^16.8.6 " ,
14
- "react-dom" : " ^16.8.6 " ,
15
- "react-intl" : " ^2.8 .0" ,
13
+ "react" : " ^16.12.0 " ,
14
+ "react-dom" : " ^16.12.0 " ,
15
+ "react-intl" : " ^3.6 .0" ,
16
16
"react-intl-redux" : " file:../.." ,
17
- "react-redux" : " ^7.0.2 " ,
18
- "react-scripts" : " 2.1.8 " ,
19
- "redux" : " ^4.0.1 "
17
+ "react-redux" : " ^7.1.3 " ,
18
+ "react-scripts" : " 3.2.0 " ,
19
+ "redux" : " ^4.0.4 "
20
20
},
21
21
"devDependencies" : {
22
- "del-cli" : " ^1.1 .0" ,
22
+ "del-cli" : " ^3.0 .0" ,
23
23
"redux-devtools" : " ^3.5.0" ,
24
24
"redux-devtools-dock-monitor" : " ^1.1.3" ,
25
25
"redux-devtools-log-monitor" : " ^1.4.0"
Original file line number Diff line number Diff line change 1
1
/* eslint-env browser */
2
- import { addLocaleData } from 'react-intl'
3
2
import { IntlProvider } from 'react-intl-redux'
4
3
import { Provider } from 'react-redux'
5
- import itLocaleData from 'react-intl/locale-data/it'
6
- import zhLocaleData from 'react-intl/locale-data/zh'
7
4
import React from 'react'
8
5
import ReactDOM from 'react-dom'
9
6
10
7
import Greeting from './components/Greeting'
11
8
import SwitchLocale from './components/SwitchLocale'
12
9
import store , { DevTools } from './store'
13
10
14
- addLocaleData ( [ ...itLocaleData , ...zhLocaleData ] )
15
-
16
11
const UPDATE_LOCALES = 'UPDATE_LOCALES'
17
12
18
13
class App extends React . Component {
Original file line number Diff line number Diff line change 30
30
"@babel/preset-env" : " ^7.7.1" ,
31
31
"@babel/preset-react" : " ^7.7.0" ,
32
32
"@babel/register" : " ^7.7.0" ,
33
- "ava" : " ^2.4.0" ,
34
33
"babel-jest" : " ^24.9.0" ,
35
34
"babel-plugin-transform-react-remove-prop-types" : " ^0.4.24" ,
36
35
"cross-env" : " ^6.0.3" ,
52
51
"lint-staged" : " ^9.4.3" ,
53
52
"npm-run-all" : " ^4.1.5" ,
54
53
"prettier-eslint-cli" : " ^5.0.0" ,
55
- "raf" : " ^3.4.1" ,
56
54
"react" : " ^16.12.0" ,
57
55
"react-dom" : " ^16.12.0" ,
58
56
"react-intl" : " ^3.6.0" ,
83
81
" Android > 2" ,
84
82
" last 2 ChromeAndroid versions"
85
83
],
86
- "ava" : {
87
- "require" : [
88
- " @babel/register" ,
89
- " raf/polyfill" ,
90
- " jsdom-global/register" ,
91
- " ./test/helpers/enzyme-config"
92
- ]
93
- },
94
84
"eslintConfig" : {
95
85
"extends" : [
96
86
" concise" ,
119
109
" eslint --fix" ,
120
110
" git add"
121
111
]
122
- },
123
- "nyc" : {
124
- "reporter" : [
125
- " html" ,
126
- " lcov" ,
127
- " text"
128
- ]
129
112
}
130
113
}
You can’t perform that action at this time.
0 commit comments