ES5 cleanup

This commit is contained in:
Paulus Schoutsen 2017-07-16 22:18:49 -07:00
parent b3f104935f
commit 35c4e1d5ae
5 changed files with 43 additions and 6 deletions

View File

@ -66,7 +66,7 @@
"iron-form": "2.0-preview",
"iron-form-element-behavior": "^2.0.0",
"iron-icon": "^2.0.0",
"iron-iconset-svg": "^2.0.0",
"iron-iconset-svg": "^2.0.1",
"iron-image": "^2.0.0",
"iron-input": "^2.0.0",
"iron-jsonp-library": "^2.0.0",

View File

@ -142,7 +142,7 @@ Polymer({
},
computeSuiteStatus: function (suiteStatus, suiteKey) {
const state = suiteStatus[suiteKey].state.replace(/_/, ' ');
var state = suiteStatus[suiteKey].state.replace(/_/, ' ');
return state.substr(0, 1).toUpperCase() + state.substr(1);
},

View File

@ -1,5 +1,39 @@
{
"shell": "src/home-assistant.html",
"fragments": [
"panels/automation/ha-panel-automation.html",
"panels/config/ha-panel-config.html",
"panels/dev-event/ha-panel-dev-event.html",
"panels/dev-info/ha-panel-dev-info.html",
"panels/dev-service/ha-panel-dev-service.html",
"panels/dev-state/ha-panel-dev-state.html",
"panels/dev-template/ha-panel-dev-template.html",
"panels/hassio/ha-panel-hassio.html",
"panels/history/ha-panel-history.html",
"panels/iframe/ha-panel-iframe.html",
"panels/kiosk/ha-panel-kiosk.html",
"panels/logbook/ha-panel-logbook.html",
"panels/map/ha-panel-map.html",
"panels/shopping-list/ha-panel-shopping-list.html",
"panels/zwave/ha-panel-zwave.html"
],
"sources": [
"src/**/*",
"panels/**/*",
"bower.json"
],
"extraDependencies": [
"bower_components/webcomponentsjs/*"
],
"lint": {
"rules": ["polymer-2-hybrid"]
}
},
"builds": [
{
"preset": "es5-bundled"
},
{
"preset": "es6-bundled"
}
]
}

View File

@ -63,7 +63,10 @@ const toProcess = [
source: './panels/hassio/hassio-main.html',
output: './build-temp/hassio-main.html',
vulcan: new Vulcanize(Object.assign({}, baseVulcanOptions, {
stripExcludes: baseExcludes.concat('bower_components/polymer/polymer.html'),
stripExcludes: baseExcludes.concat([
'bower_components/polymer/polymer.html',
'bower_components/iron-meta/iron-meta.html',
]),
})),
},
];

View File

@ -103,8 +103,8 @@ Polymer({
},
updateCameraFeedSrc: function (stateObj) {
const attr = stateObj.attributes;
const time = (new Date()).getTime();
var attr = stateObj.attributes;
var time = (new Date()).getTime();
this.cameraFeedSrc = attr.entity_picture + '&time=' + time;
},