From d243f2ead613c9663b0140fa89bd7248beec49d7 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 8 Jun 2018 15:26:48 -0400 Subject: [PATCH] Build a new Hass.io panel (#1271) * Build a new Hass.io panel * Use webcomponents-lite.js * Compress new panel * Lint --- hassio/config.js | 6 +- hassio/index.html | 2 +- hassio/script/build_hassio | 10 +++- hassio/script/develop | 7 +-- hassio/script/gen-index-html.js | 2 +- hassio/src/entrypoint.js | 5 ++ hassio/webpack.config.js | 12 +++- hassio/webpack.legacy.config.js | 78 +++++++++++++++++++++++++ polymer.json | 3 +- src/layouts/partial-panel-resolver.js | 4 -- src/panels/hassio/ha-panel-hassio.js | 84 --------------------------- 11 files changed, 112 insertions(+), 101 deletions(-) create mode 100644 hassio/src/entrypoint.js create mode 100644 hassio/webpack.legacy.config.js delete mode 100644 src/panels/hassio/ha-panel-hassio.js diff --git a/hassio/config.js b/hassio/config.js index fbffc770d5..957a3f3c6e 100644 --- a/hassio/config.js +++ b/hassio/config.js @@ -2,7 +2,9 @@ const path = require('path'); module.exports = { // Target directory for the build. - buildDir: path.resolve(__dirname, 'build-es5'), + buildDirLegacy: path.resolve(__dirname, 'build-es5'), + buildDir: path.resolve(__dirname, 'build'), // Path where the Hass.io frontend will be publicly available. - publicPath: '/api/hassio/app-es5' + publicPath: '/api/hassio/app', + publicPathLegacy: '/api/hassio/app-es5', } \ No newline at end of file diff --git a/hassio/index.html b/hassio/index.html index eeb979cb52..f560d39d45 100644 --- a/hassio/index.html +++ b/hassio/index.html @@ -26,7 +26,7 @@ 'import' in document.createElement('link') && 'content' in document.createElement('template')); if (!webComponentsSupported) { - addScript('/static/webcomponents-bundle.js'); + addScript('/static/webcomponents-lite.js'); }