diff --git a/script/sw-precache.js b/script/sw-precache.js index b67f3b1314..c82867f97d 100644 --- a/script/sw-precache.js +++ b/script/sw-precache.js @@ -21,7 +21,8 @@ function md5(filename) { var appPaths = ['/', '/states', '/logbook', '/history', '/map', '/devService', '/devState', '/devEvent', '/devInfo', '/devTemplate']; -var fingerprinted = ['frontend.html', 'mdi.html', 'core.js', 'partial-map.html']; +var fingerprinted = ['frontend.html', 'mdi.html', 'core.js', 'partial-map.html', + 'dev-tools.html']; var dynamicUrlToDependencies = {}; diff --git a/script/vulcanize.js b/script/vulcanize.js index 554c0f4f32..d003ccb483 100644 --- a/script/vulcanize.js +++ b/script/vulcanize.js @@ -16,24 +16,27 @@ function minifyHTML(html) { }); } -var toProcess = [ +const baseVulcanOptions = { + inlineScripts: true, + inlineCss: true, + implicitStrip: true, + stripComments: true, +}; + +const toProcess = [ { source: 'src/home-assistant.html', output: 'frontend.html', - vulcan: new Vulcanize({ + vulcan: new Vulcanize(Object.assign({}, baseVulcanOptions, { stripExcludes: [ 'bower_components/font-roboto/roboto.html', ], - inlineScripts: true, - inlineCss: true, - implicitStrip: true, - stripComments: true, - }), + })), }, { source: 'src/layouts/partial-map.html', output: 'partial-map.html', - vulcan: new Vulcanize({ + vulcan: new Vulcanize(Object.assign({}, baseVulcanOptions, { stripExcludes: [ 'bower_components/polymer/polymer.html', 'bower_components/paper-toolbar/paper-toolbar.html', @@ -41,16 +44,28 @@ var toProcess = [ 'bower_components/iron-icon/iron-icon.html', 'bower_components/iron-image/iron-image.html', ], - inlineScripts: true, - inlineCss: true, - implicitStrip: true, - stripComments: true, - }), + })), + }, + { + source: 'src/entry-points/dev-tools.html', + output: 'dev-tools.html', + vulcan: new Vulcanize(Object.assign({}, baseVulcanOptions, { + stripExcludes: [ + 'bower_components/polymer/polymer.html', + 'bower_components/paper-button/paper-button.html', + 'bower_components/paper-input/paper-input.html', + 'bower_components/paper-icon-button/paper-icon-button.html', + 'bower_components/paper-spinner/paper-spinner.html', + 'bower_components/paper-toolbar/paper-toolbar.html', + 'bower_components/paper-menu/paper-menu.html', + 'bower_components/paper-scroll-header-panel/paper-scroll-header-panel.html', + ], + })), }, ]; -toProcess.forEach(function (info) { - info.vulcan.process(info.source, function (err, inlinedHtml) { +toProcess.forEach(info => { + info.vulcan.process(info.source, (err, inlinedHtml) => { if (err !== null) { console.error(info.source, err); return; diff --git a/src/components/services-list.html b/src/components/services-list.html index 8174ce61a0..50ac408340 100644 --- a/src/components/services-list.html +++ b/src/components/services-list.html @@ -2,8 +2,6 @@ - -