Skip to content

Commit 0d337dd

Browse files
committed
Merge pull request #6 from wrakky/React-15
2 parents badcc37 + f2534c7 commit 0d337dd

File tree

6 files changed

+93
-55
lines changed

6 files changed

+93
-55
lines changed

.eslintrc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
{
22
"extends": "eslint:recommended",
3-
"ecmaFeatures": {
4-
"jsx": true,
5-
"modules": true,
6-
"spread": true
3+
"parserOptions": {
4+
"ecmaVersion": 6,
5+
"sourceType": "module",
6+
"ecmaFeatures": {
7+
"jsx": true,
8+
"spread": true
9+
}
710
},
811
"env": {
912
"browser": true,
@@ -19,6 +22,7 @@
1922
"quotes": [2, "single"],
2023
"indent": [2, 2, {"SwitchCase": 1}],
2124
"eol-last": 2,
22-
"react/jsx-uses-react": 1
25+
"react/jsx-uses-react": 1,
26+
"react/jsx-uses-vars": 1
2327
}
2428
}

demo/package.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,32 @@
1111
"author": "Peter Newnham",
1212
"license": "MIT",
1313
"devDependencies": {
14-
"autoprefixer": "6.3.1",
15-
"babel-cli": "^6.4.5",
16-
"babel-core": "^6.4.5",
17-
"babel-preset-es2015": "^6.3.13",
18-
"babel-preset-react": "^6.3.13",
19-
"babel-preset-stage-2": "6.3.13",
20-
"css-loader": "0.23.1",
21-
"extract-text-webpack-plugin": "1.0.1",
22-
"html-webpack-plugin": "2.7.1",
23-
"json-loader": "0.5.4",
24-
"node-sass": "3.4.2",
25-
"postcss-loader": "0.8.0",
26-
"react-hot-loader": "1.3.0",
27-
"redux-devtools": "3.0.1",
28-
"sass-loader": "3.1.2",
29-
"style-loader": "0.13.0",
30-
"webpack": "^1.12.12",
14+
"autoprefixer": "^6.3.6",
15+
"babel-cli": "^6.8.0",
16+
"babel-core": "^6.8.0",
17+
"babel-preset-es2015": "^6.6.0",
18+
"babel-preset-react": "^6.5.0",
19+
"babel-preset-stage-2": "^6.5.0",
20+
"css-loader": "^0.23.1",
21+
"extract-text-webpack-plugin": "^1.0.1",
22+
"html-webpack-plugin": "^2.17.0",
23+
"json-loader": "^0.5.4",
24+
"node-sass": "^3.7.0",
25+
"postcss-loader": "^0.9.1",
26+
"react-hot-loader": "^1.3.0",
27+
"redux-devtools": "^3.3.1",
28+
"sass-loader": "^3.2.0",
29+
"style-loader": "^0.13.1",
30+
"webpack": "^1.13.0",
3131
"webpack-dev-server": "^1.14.1"
3232
},
3333
"dependencies": {
34-
"brace": "0.7.0",
35-
"normalize-scss": "4.0.3",
36-
"react": "0.14.6",
37-
"react-ace": "3.1.0",
38-
"react-dom": "0.14.6",
39-
"react-redux": "4.0.6",
40-
"redux": "3.0.5"
34+
"brace": "^0.8.0",
35+
"normalize-scss": "^4.2.1",
36+
"react": "^15.0.2",
37+
"react-ace": "^3.4.1",
38+
"react-dom": "^15.0.2",
39+
"react-redux": "^4.4.5",
40+
"redux": "^3.5.2"
4141
}
4242
}

demo/src/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,13 @@
66
</head>
77
<body>
88
<div id="root"></div>
9+
<script>
10+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
11+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
12+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
13+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
14+
ga('create', 'UA-128849-4', 'auto');
15+
ga('send', 'pageview');
16+
</script>
917
</body>
1018
</html>

demo/src/js/components/Header.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ import 'sass/header';
55
export default function Header() {
66
return (
77
<header>
8+
<a href="https://github.com/wrakky/react-html-parser" target="_blank">
9+
<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg">
10+
<path id="github" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59 0.4 0.07 0.55-0.17 0.55-0.38 0-0.19-0.01-0.82-0.01-1.49-2.01 0.37-2.53-0.49-2.69-0.94-0.09-0.23-0.48-0.94-0.82-1.13-0.28-0.15-0.68-0.52-0.01-0.53 0.63-0.01 1.08 0.58 1.23 0.82 0.72 1.21 1.87 0.87 2.33 0.66 0.07-0.52 0.28-0.87 0.51-1.07-1.78-0.2-3.64-0.89-3.64-3.95 0-0.87 0.31-1.59 0.82-2.15-0.08-0.2-0.36-1.02 0.08-2.12 0 0 0.67-0.21 2.2 0.82 0.64-0.18 1.32-0.27 2-0.27 0.68 0 1.36 0.09 2 0.27 1.53-1.04 2.2-0.82 2.2-0.82 0.44 1.1 0.16 1.92 0.08 2.12 0.51 0.56 0.82 1.27 0.82 2.15 0 3.07-1.87 3.75-3.65 3.95 0.29 0.25 0.54 0.73 0.54 1.48 0 1.07-0.01 1.93-0.01 2.2 0 0.21 0.15 0.46 0.55 0.38C13.71 14.53 16 11.53 16 8 16 3.58 12.42 0 8 0z" />
11+
</svg>
12+
View Project on GitHub
13+
</a>
814
<h1>React HTML Parser Demo</h1>
915
</header>
1016
);

demo/src/sass/header.scss

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
1+
$headerLinkColor: #cc0000;
2+
13
header {
24
h1 {
35
padding: 0 0 1rem;
46
}
7+
a {
8+
float: right;
9+
text-decoration: none;
10+
color: $headerLinkColor;
11+
line-height: 32px;
12+
svg {
13+
margin-right: 5px;
14+
position: relative;
15+
top: 2px;
16+
#github {
17+
fill: $headerLinkColor;
18+
}
19+
}
20+
&:hover {
21+
color: darken($headerLinkColor, 10%);
22+
#github {
23+
fill: darken($headerLinkColor, 10%);
24+
}
25+
}
26+
}
527
}

package.json

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -40,40 +40,38 @@
4040
"author": "Peter Newnham",
4141
"license": "MIT",
4242
"devDependencies": {
43-
"babel": "^6.3.26",
44-
"babel-cli": "^6.4.0",
45-
"babel-core": "^6.4.0",
46-
"babel-loader": "^6.2.1",
47-
"babel-plugin-transform-object-assign": "^6.3.13",
48-
"babel-preset-es2015": "^6.3.13",
49-
"babel-preset-react": "^6.3.13",
50-
"coveralls": "^2.11.6",
51-
"eslint": "^1.10.3",
52-
"eslint-plugin-react": "3.15.0",
53-
"html-webpack-plugin": "^1.7.0",
54-
"inject-loader": "2.0.1",
43+
"babel": "^6.5.2",
44+
"babel-cli": "^6.8.0",
45+
"babel-core": "^6.8.0",
46+
"babel-loader": "^6.2.4",
47+
"babel-plugin-transform-object-assign": "^6.8.0",
48+
"babel-preset-es2015": "^6.6.0",
49+
"babel-preset-react": "^6.5.0",
50+
"coveralls": "^2.11.9",
51+
"eslint": "^2.10.1",
52+
"eslint-plugin-react": "^5.1.1",
53+
"inject-loader": "^2.0.1",
5554
"isparta-loader": "^2.0.0",
5655
"jasmine-core": "^2.4.1",
5756
"json-loader": "^0.5.4",
58-
"karma": "^0.13.19",
59-
"karma-coverage": "^0.5.3",
60-
"karma-jasmine": "^0.3.6",
61-
"karma-phantomjs-launcher": "^0.2.3",
62-
"karma-phantomjs-shim": "^1.2.0",
63-
"karma-spec-reporter": "0.0.23",
57+
"karma": "^0.13.22",
58+
"karma-coverage": "^1.0.0",
59+
"karma-jasmine": "^1.0.2",
60+
"karma-phantomjs-launcher": "^1.0.0",
61+
"karma-phantomjs-shim": "^1.4.0",
62+
"karma-spec-reporter": "^0.0.26",
6463
"karma-webpack": "^1.7.0",
65-
"phantomjs": "^1.9.19",
66-
"react": "^0.14.6",
67-
"react-addons-test-utils": "^0.14.6",
68-
"react-dom": "^0.14.6",
69-
"rimraf": "^2.5.0",
70-
"webpack": "^1.12.11",
71-
"webpack-dev-server": "^1.14.1"
64+
"phantomjs-prebuilt": "^2.1.7",
65+
"react": "^15.0.2",
66+
"react-addons-test-utils": "^15.0.2",
67+
"react-dom": "^15.0.2",
68+
"rimraf": "^2.5.2",
69+
"webpack": "^1.13.0"
7270
},
7371
"dependencies": {
7472
"htmlparser2": "^3.9.0"
7573
},
7674
"peerDependencies": {
77-
"react": "^0.13.0 || ^0.14.0"
75+
"react": "^0.13.0 || ^0.14.0 || ^15.0.0"
7876
}
7977
}

0 commit comments

Comments
 (0)