Skip to content

Commit 1d235b0

Browse files
committed
chore: upgrade deps and react-flag-icon to version 1.0.14
1 parent a91541d commit 1d235b0

File tree

6 files changed

+772
-507
lines changed

6 files changed

+772
-507
lines changed

package.json

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -37,46 +37,43 @@
3737
"flow"
3838
],
3939
"dependencies": {
40-
"node-sass": "^4.1.1",
41-
"react": "^15.3.1",
42-
"react-css-modules": "^4.0.0",
43-
"react-dom": "^15.3.1",
44-
"react-flag-icon-css": "^1.0.7",
45-
"tcomb": "^3.2.16",
46-
"webpack": "^2.2.0-rc.3",
47-
"webpack-dev-server": "^2.2.0-rc.0"
40+
"node-sass": "^4.5.3",
41+
"react": "^15.5.4",
42+
"react-css-modules": "^4.0.5",
43+
"react-dom": "^15.5.4",
44+
"react-flag-icon-css": "^1.0.14",
45+
"webpack": "^2.5.1",
46+
"webpack-dev-server": "^2.4.5"
4847
},
4948
"devDependencies": {
5049
"babel-cli": "^6.18.0",
5150
"babel-core": "^6.21.0",
5251
"babel-eslint": "^7.1.1",
5352
"babel-loader": "^6.2.10",
5453
"babel-plugin-transform-object-rest-spread": "^6.20.2",
55-
"babel-preset-es2015": "^6.18.0",
56-
"babel-preset-react": "^6.16.0",
57-
"babel-register": "^6.18.0",
58-
"css-loader": "^0.26.1",
59-
"eslint": "^3.12.2",
54+
"babel-preset-es2015": "^6.24.1",
55+
"babel-preset-react": "^6.24.1",
56+
"babel-register": "^6.24.1",
57+
"css-loader": "^0.28.1",
58+
"eslint": "^3.19.0",
6059
"eslint-config-airbnb": "^13.0.0",
6160
"eslint-plugin-babel": "^4.0.0",
6261
"eslint-plugin-flowtype": "^2.29.1",
6362
"eslint-plugin-import": "^2.2.0",
6463
"eslint-plugin-jsx-a11y": "^2.2.3",
6564
"eslint-plugin-react": "^6.8.0",
66-
"extract-text-webpack-plugin": "^2.0.0-beta.4",
65+
"extract-text-webpack-plugin": "^2.1.0",
6766
"file-loader": "^0.9.0",
68-
"flow-bin": "^0.37.4",
69-
"html-webpack-plugin": "^2.25.0",
67+
"flow-bin": "^0.46.0",
68+
"html-webpack-plugin": "^2.28.0",
7069
"json-loader": "^0.5.4",
71-
"postcss-loader": "^1.2.1",
70+
"postcss-loader": "^2.0.5",
7271
"pre-commit": "^1.2.2",
73-
"react-flag-icon-css": "^1.0.7",
72+
"react-flag-icon-css": "^1.0.14",
7473
"sass-lint": "^1.10.2",
75-
"sass-loader": "^4.1.0",
74+
"sass-loader": "^6.0.5",
7675
"style-loader": "^0.13.1",
77-
"tcomb": "^3.2.16",
78-
"tcomb-react": "^0.9.3",
79-
"webpack": "^2.2.0-rc.3",
80-
"webpack-dev-server": "^2.2.0-rc.0"
76+
"webpack": "^2.5.1",
77+
"webpack-dev-server": "^2.4.5"
8178
}
8279
}

postcss.config.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/meta-flags-css/CustomFlags.scss

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Note: this file doesn't have to contain SASS, you can write it in simple Css,
3+
* PostCSS, or whatever preprocessor your app is using. See below for the Css
4+
* version.
5+
*/
6+
17
$flag-icon-css-path: './images' !default;
28
@import '../../node_modules/flag-icon-css/sass/variables';
39
@import '../../node_modules/flag-icon-css/sass/flag-icon-base';
@@ -9,3 +15,30 @@ $flag-icon-css-path: './images' !default;
915
.theme-base {
1016
cursor: default; // just a placeholder
1117
}
18+
19+
// Css version of this file.
20+
/*
21+
.flag-icon-w1 {
22+
background-image: url(./images/4x3/w1.svg);
23+
}
24+
25+
.flag-icon-w1.flag-icon-squared {
26+
background-image: url(./images/1x1/w1.svg);
27+
}
28+
29+
.flag-icon-w2 {
30+
background-image: url(./images/4x3/w2.svg);
31+
}
32+
33+
.flag-icon-w2.flag-icon-squared {
34+
background-image: url(./images/1x1/w2.svg);
35+
}
36+
37+
.flag-icon-w3 {
38+
background-image: url(./images/4x3/w3.svg);
39+
}
40+
41+
.flag-icon-w3.flag-icon-squared {
42+
background-image: url(./images/1x1/w3.svg);
43+
}
44+
*/

src/meta-flags-css/index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
export { default } from './CustomFlags.scss'
1+
export { default as styles } from './CustomFlags.scss'
2+
3+
export const codes = {
4+
w1: 'Example 1 country',
5+
w2: 'Example 2 country',
6+
w3: 'Example 3 country',
7+
}
8+
9+
// You can comment or remove the following line if you don't use Facebook's Flow.
10+
export type CustomCodeType = $Keys<typeof codes>

webpack/webpack.config.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,18 @@ const getRules = options => {
2424
{
2525
test: CSS_REGEX,
2626
loader: ExtractTextPlugin.extract({
27-
fallbackLoader: "style-loader",
28-
loader: [
27+
fallback: "style-loader",
28+
use: [
2929
{ loader: 'css-loader', query: {
3030
modules: useCssModules,
3131
importLoaders: useCssModules ? 2 : '',
3232
localIdentName: useCssModules ? '[name]__[local]__[hash:base64:5]' : ''
3333
} },
34-
{ loader: 'postcss-loader' },
34+
{ loader: 'postcss-loader', options: {
35+
plugins: [
36+
autoprefixer({ browsers: ['last 4 versions'] }),
37+
],
38+
} },
3539
{ loader: 'sass-loader', options: {} }
3640
]
3741
}),

0 commit comments

Comments
 (0)