Skip to content

Commit c4037b0

Browse files
committed
First Polymer 2.x version
Refactor Polymer 1.x version to class based element. Because we don't need any template binding we will only mixin the Polymer.PropertyAccessors mixin.
1 parent e9f2adf commit c4037b0

File tree

7 files changed

+162
-185
lines changed

7 files changed

+162
-185
lines changed

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"no-console": 0
55
},
66
"env": {
7-
"browser": true
7+
"browser": true,
8+
"es6": true
89
},
910
"plugins": [
1011
"html"

bower.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "svg-piechart",
3-
"version": "1.1.0",
3+
"version": "2.0.0",
44
"authors": ["Uemit Seren <uemit.seren@gmail.com>"],
55
"description": "Element to draw a piechart on a SVG.",
6-
"keywords": "svg, piechart, polymer, web-components",
6+
"keywords": ["svg, piechart, polymer, web-components"],
77
"main": "svg-piechart.html",
88
"license": "MIT",
99
"homepage": "https://github.com/timeu/svg-piechart/",
@@ -12,12 +12,14 @@
1212
"/test/"
1313
],
1414
"dependencies": {
15-
"polymer": "Polymer/polymer#^1.9.0"
15+
"polymer": "Polymer/polymer#^2.0.0"
1616
},
1717
"devDependencies": {
18-
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
19-
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
18+
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#^2.0.0",
2019
"web-component-tester": "Polymer/web-component-tester#^6.0.0",
21-
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
20+
"webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0"
21+
},
22+
"resolutions": {
23+
"polymer": "^2.0.0"
2224
}
2325
}

demo/index.html

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,17 @@
1111

1212
<link rel="import" href="../svg-piechart.html">
1313

14-
<style is="custom-style" include="demo-pages-shared-styles">
15-
.vertical-section-container {
16-
max-width: 48em;
17-
margin: 0 auto;
18-
}
19-
.horizontal-section {
20-
text-align: center;
21-
}
22-
</style>
14+
<custom-style>
15+
<style is="custom-style" include="demo-pages-shared-styles">
16+
.vertical-section-container {
17+
max-width: 48em;
18+
margin: 0 auto;
19+
}
20+
.horizontal-section {
21+
text-align: center;
22+
}
23+
</style>
24+
</custom-style>
2325
</head>
2426
<body>
2527
<div class="vertical-section-container centered">

index.html

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@
99
-->
1010
<html>
1111
<head>
12-
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
13-
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
14-
<link rel="import" href="../iron-component-page/iron-component-page.html">
15-
16-
</head>
17-
<body unresolved>
18-
19-
<iron-component-page src="svg-piechart.html"></iron-component-page>
20-
21-
</body>
12+
<meta charset="utf-8">
13+
<meta http-equiv="refresh" content="0;url=demo/" />
14+
<title>svg-piechart</title>
15+
</head>
16+
<body>
17+
<!--
18+
ELEMENT API DOCUMENTATION SUPPORT COMING SOON
19+
Visit demo/index.html to see live examples of your element running.
20+
This page will automatically redirect you there when run in the browser
21+
with `polymer serve`.
22+
-->
23+
</body>
2224
</html>

polymer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"lint": {
33
"rules": [
4-
"polymer-1"
4+
"polymer-2"
55
]
66
}
77
}

0 commit comments

Comments
 (0)