Always cache all panels in service worker.

pull/109/head
Paulus Schoutsen 2016-09-19 23:52:44 -07:00
parent 7d32ee0912
commit 0a4454c68f
1 changed files with 7 additions and 3 deletions

View File

@ -30,10 +30,14 @@ var staticFingerprinted = [
'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
var panelsFingerprinted = [
'map', 'dev-event', 'dev-info', 'dev-service', 'dev-state', 'dev-template',
];
var panelsFingerprinted = getDirectories('./panels');
function md5(filename) {
return crypto.createHash('md5')