Skip to content

Commit

Permalink
Rename .mp to .mp.ico to allow gzip/br compression, maybe.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeaun committed Apr 27, 2019
1 parent bacce44 commit 0a7e0e4
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import circle from '@turf/circle';
import throttle from 'just-throttle';
import { html, render } from 'lit-html';

import treesDataPath from './data/trees.min.mp';
import treesDataPath from './data/trees.min.mp.ico';
import speciesData from './data/species.json';
import familiesSpeciesData from './data/families-species.json';
import poisData from './data/pois.json';
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, viewport-fit=cover">
<title>ExploreTrees.SG - 🌳 Explore Trees in Singapore 🇸🇬</title>
<link rel="stylesheet" href="app.css">
<link id="dummy-fetch" as="fetch" href="./data/trees.min.mp" crossorigin>
<link id="dummy-fetch" as="fetch" href="./data/trees.min.mp.ico" crossorigin>
<!-- metacrap: https://adactio.com/journal/9881 -->
<meta name="description" content="Explore trees in Singapore">
<meta name="twitter:card" content="summary">
Expand Down
2 changes: 1 addition & 1 deletion scripts/minify-trees.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fs.writeFileSync(filePath, JSON.stringify(finalData));
console.log(`JSON file written: ${filePath}`);

const mpData = msgpack.serialize(finalData);
const mpFilePath = 'data/trees.min.mp';
const mpFilePath = 'data/trees.min.mp.ico';
fs.writeFileSync(mpFilePath, mpData);
console.log(`MessagePack file written: ${mpFilePath}`);

Expand Down
2 changes: 1 addition & 1 deletion sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ workbox.routing.registerRoute(
);

workbox.routing.registerRoute(
/\/.*\.mp$/,
/\/.*\.(mp|mp\.ico)$/,
new workbox.strategies.CacheFirst({
cacheName: 'data',
plugins: [
Expand Down

0 comments on commit 0a7e0e4

Please sign in to comment.