Skip to content

Commit

Permalink
Fix service worker resource list for the new demo
Browse files Browse the repository at this point in the history
 - Don't cache Roboto Condensed, which is no longer used
 - Add back style sheet to load the Roboto font, which is used
 - Cache dialog and datalist polyfills used by the demo app

Change-Id: I0e347748a9830d95db0e4ba6bbfda7033edd3ac1
  • Loading branch information
joeyparrish committed May 1, 2019
1 parent 598d330 commit e8d95a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
<link rel="icon" href="favicon.ico">
<!-- Load MDL, with the desired color scheme. -->
<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.indigo-blue.min.css">

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">

<script defer src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"></script>
Expand Down
9 changes: 8 additions & 1 deletion demo/service_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ const CRITICAL_RESOURCES = [
// know the Web Font URL in advance, and Google Web Fonts can serve the
// correct version of the font to whatever browser is making the request.
'https://fonts.googleapis.com/css?family=Roboto',
'https://fonts.googleapis.com/css?family=Roboto+Condensed',
'https://fonts.googleapis.com/icon?family=Material+Icons',

'load.js',
Expand All @@ -81,6 +80,14 @@ const CRITICAL_RESOURCES = [
// These files are required for the demo to include MDL.
'https://code.getmdl.io/1.3.0/material.indigo-blue.min.css',
'https://code.getmdl.io/1.3.0/material.min.js',

// MDL modal dialogs are enabled by including these:
'../node_modules/dialog-polyfill/dialog-polyfill.js',
'../node_modules/dialog-polyfill/dialog-polyfill.css',

// Datalist-like fields are enabled by including these:
'../node_modules/awesomplete/awesomplete.css',
'../node_modules/awesomplete/awesomplete.js',
];


Expand Down

0 comments on commit e8d95a4

Please sign in to comment.