Skip to content

Commit

Permalink
First Polymer 2.x version
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
timeu committed May 25, 2017
1 parent e9f2adf commit c4037b0
Show file tree
Hide file tree
Showing 7 changed files with 162 additions and 185 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"no-console": 0
},
"env": {
"browser": true
"browser": true,
"es6": true
},
"plugins": [
"html"
Expand Down
14 changes: 8 additions & 6 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "svg-piechart",
"version": "1.1.0",
"version": "2.0.0",
"authors": ["Uemit Seren <[email protected]>"],
"description": "Element to draw a piechart on a SVG.",
"keywords": "svg, piechart, polymer, web-components",
"keywords": ["svg, piechart, polymer, web-components"],
"main": "svg-piechart.html",
"license": "MIT",
"homepage": "https://github.com/timeu/svg-piechart/",
Expand All @@ -12,12 +12,14 @@
"/test/"
],
"dependencies": {
"polymer": "Polymer/polymer#^1.9.0"
"polymer": "Polymer/polymer#^2.0.0"
},
"devDependencies": {
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#^2.0.0",
"web-component-tester": "Polymer/web-component-tester#^6.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
"webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0"
},
"resolutions": {
"polymer": "^2.0.0"
}
}
20 changes: 11 additions & 9 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@

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

<style is="custom-style" include="demo-pages-shared-styles">
.vertical-section-container {
max-width: 48em;
margin: 0 auto;
}
.horizontal-section {
text-align: center;
}
</style>
<custom-style>
<style is="custom-style" include="demo-pages-shared-styles">
.vertical-section-container {
max-width: 48em;
margin: 0 auto;
}
.horizontal-section {
text-align: center;
}
</style>
</custom-style>
</head>
<body>
<div class="vertical-section-container centered">
Expand Down
22 changes: 12 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@
-->
<html>
<head>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../iron-component-page/iron-component-page.html">

</head>
<body unresolved>

<iron-component-page src="svg-piechart.html"></iron-component-page>

</body>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0;url=demo/" />
<title>svg-piechart</title>
</head>
<body>
<!--
ELEMENT API DOCUMENTATION SUPPORT COMING SOON
Visit demo/index.html to see live examples of your element running.
This page will automatically redirect you there when run in the browser
with `polymer serve`.
-->
</body>
</html>
2 changes: 1 addition & 1 deletion polymer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"lint": {
"rules": [
"polymer-1"
"polymer-2"
]
}
}
Loading

0 comments on commit c4037b0

Please sign in to comment.