bust cache on css on builds

This commit is contained in:
David 2022-03-20 10:43:25 -04:00
parent e2bd35acba
commit d2860a705e
2 changed files with 11 additions and 12 deletions

View File

@ -29,7 +29,7 @@
media="screen"
rel="stylesheet"
type="text/css"
href="/css/site.css"
href="/css/site.css?1647787377775"
/>
<meta
property="title"
@ -133,7 +133,7 @@
<p>
There are currently <span id="storeCount">96</span> stores indexed
on this page. Last updated
<span id="updatedOn">March 19, 2022</span>.
<span id="updatedOn">March 20, 2022</span>.
</p>
</div>
<div id="selected"></div>
@ -186,8 +186,12 @@
<td>867 Broadway, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Bluestockings</td>
<td>172 Allen Street, New York</td>
<td class="name">Better Read Than Dead &amp; Burly Coffee</td>
<td>90 Kosciuszko St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Bluestockings Cooperative</td>
<td>116 Suffolk Street, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Bonnie Slotnick Cookbooks</td>
@ -286,9 +290,7 @@
<td>99 St. Mark's Place, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">
Every Thing Goes Book Cafe and Neighborhood Stage
</td>
<td class="name">ETG Book Cafe</td>
<td>208 Bay St, Staten Island</td>
</tr>
<tr id="" class="spotRow">
@ -397,10 +399,6 @@
<td class="name">Posman Books Chelsea Market</td>
<td>75 9th Avenue, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Posman Books Rockefeller Center</td>
<td>30 Rockefeller Plaza, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">PowerHouse Arena</td>
<td>28 Adams St, Brooklyn</td>

View File

@ -24,7 +24,8 @@ fs.readFile("./index.html", function (err, data) {
day: "numeric",
})
);
const cssurl = $("link[type='text/css']").attr("href");
$("link[type='text/css']").attr("href", cssurl + "?" + new Date().getTime());
fs.writeFile("./index.html", $.html(), (err) => {
if (err) throw err;
console.log("Default view updated.");