mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-11-25 20:42:40 +00:00
Migrate to Node 16 (#118)
* Node 16: fix build dependencies * Node 16: fix Bootstrap dependency problem * Node 16: fix error in HTML writer * Node 16: move await to proper place (h/t alliejones)
This commit is contained in:
@@ -132,7 +132,7 @@ function processPages (engines, pages, posts, prod) {
|
||||
}
|
||||
|
||||
try {
|
||||
html = shrink(html);
|
||||
html = await shrink(html);
|
||||
} catch (e) {
|
||||
e.message = `Error while minifying page "${page.input}": ${e.message.slice(0, 50)}`;
|
||||
throw e;
|
||||
@@ -145,7 +145,7 @@ function processPages (engines, pages, posts, prod) {
|
||||
await Promise.all([
|
||||
fs.writeFile(output, Buffer.from(html)),
|
||||
page.json && fs.writeFile(resolve('dist', page.json), Buffer.from(
|
||||
prod ? JSON.stringify(json) : JSON.stringify(json, null, 2),
|
||||
prod ? JSON.stringify(json) : JSON.stringify(json, null, 2)
|
||||
)),
|
||||
]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user