diff --git a/package.json b/package.json
index da4e0db338..b45a199a0b 100644
--- a/package.json
+++ b/package.json
@@ -40,6 +40,7 @@
"eslint-plugin-html": "^1.5.1",
"eslint-plugin-import": "^1.11.0",
"html-minifier": "^3.0.1",
+ "hydrolysis": "^1.24.1",
"polymer-cli": "^0.12.0",
"rollup": "^0.34.1",
"rollup-plugin-babel": "^2.6.1",
diff --git a/script/vulcanize.js b/script/vulcanize.js
index 9328f55691..007e3c25ca 100755
--- a/script/vulcanize.js
+++ b/script/vulcanize.js
@@ -2,6 +2,7 @@
var Vulcanize = require('vulcanize');
var minify = require('html-minifier');
+var hyd = require('hydrolysis');
var fs = require('fs');
if (!fs.existsSync('build')) {
@@ -32,14 +33,12 @@ const baseVulcanOptions = {
stripComments: true,
};
-const vulcan = new Vulcanize({
+const panelVulcan = new Vulcanize({
inlineScripts: true,
inlineCss: true,
implicitStrip: true,
stripComments: true,
- stripExcludes: [
- 'bower_components/polymer/polymer.html',
- ],
+ stripExcludes: undefined,
});
const toProcess = [
@@ -58,13 +57,13 @@ fs.readdirSync('./panels').forEach(panel => {
toProcess.push({
source: `panels/${panel}/ha-panel-${panel}.html`,
output: `panels/ha-panel-${panel}.html`,
+ vulcan: panelVulcan,
});
});
function process(entry) {
console.log('Processing', entry.source);
- const vulc = entry.vulcan || vulcan;
- vulc.process(entry.source, (err, inlinedHtml) => {
+ entry.vulcan.process(entry.source, (err, inlinedHtml) => {
if (err !== null) {
console.error(entry.source, err);
return;
@@ -80,4 +79,11 @@ function process(entry) {
});
}
-process(toProcess.pop());
+// Fetch all dependencies of main app and exclude them from panels
+hyd.Analyzer.analyze('src/home-assistant.html')
+ .then(function (analyzer) {
+ return analyzer._getDependencies('src/home-assistant.html');
+ })
+ .then(deps => { panelVulcan.stripExcludes = deps; })
+ // And then start vulcanizing!!
+ .then(() => process(toProcess.pop()));
diff --git a/src/home-assistant.html b/src/home-assistant.html
index a7d6621897..0ead4d02ac 100644
--- a/src/home-assistant.html
+++ b/src/home-assistant.html
@@ -12,7 +12,8 @@
-
+
+
diff --git a/src/layouts/partial-base.html b/src/layouts/partial-base.html
index c042402e23..1920664276 100644
--- a/src/layouts/partial-base.html
+++ b/src/layouts/partial-base.html
@@ -5,6 +5,8 @@
+
+
@@ -15,14 +17,14 @@
-moz-user-select: none;
}
- .menu-icon {
- margin-right: 24px;
+ .title {
+ margin-left: 24px !important;
}
-
+
@@ -49,13 +51,5 @@ Polymer({
value: false,
},
},
-
- computeMenuButtonClass: function (narrow, showMenu) {
- return !narrow && showMenu ? 'menu-icon invisible' : 'menu-icon';
- },
-
- toggleMenu: function () {
- this.fire('open-menu');
- },
});
diff --git a/src/resources/panel-imports.html b/src/resources/panel-imports.html
deleted file mode 100644
index 3ba7901996..0000000000
--- a/src/resources/panel-imports.html
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-