Revert: Always cache all panels in service worker.

This commit is contained in:
Paulus Schoutsen 2016-10-02 15:27:58 -07:00
parent 22386a5035
commit 95cbc85b7f

View File

@ -30,14 +30,11 @@ var staticFingerprinted = [
'core.js', 'core.js',
]; ];
function getDirectories(srcpath) { // These panels will always be registered inside HA and thus can
return fs.readdirSync(srcpath).filter(function(file) { // be safely assumed to be able to preload.
return fs.statSync(path.join(srcpath, file)).isDirectory(); var panelsFingerprinted = [
}); 'map', 'dev-event', 'dev-info', 'dev-service', 'dev-state', 'dev-template',
} ];
// The panels that will always be loaded
var panelsFingerprinted = getDirectories('./panels');
function md5(filename) { function md5(filename) {
return crypto.createHash('md5') return crypto.createHash('md5')