mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-13 12:26:35 +00:00
Always cache all panels in service worker.
This commit is contained in:
parent
7d32ee0912
commit
0a4454c68f
@ -30,10 +30,14 @@ var staticFingerprinted = [
|
|||||||
'core.js',
|
'core.js',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
function getDirectories(srcpath) {
|
||||||
|
return fs.readdirSync(srcpath).filter(function(file) {
|
||||||
|
return fs.statSync(path.join(srcpath, file)).isDirectory();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// The panels that will always be loaded
|
// The panels that will always be loaded
|
||||||
var panelsFingerprinted = [
|
var panelsFingerprinted = getDirectories('./panels');
|
||||||
'map', 'dev-event', 'dev-info', 'dev-service', 'dev-state', 'dev-template',
|
|
||||||
];
|
|
||||||
|
|
||||||
function md5(filename) {
|
function md5(filename) {
|
||||||
return crypto.createHash('md5')
|
return crypto.createHash('md5')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user