Skip to content

Commit 8a8b874

Browse files
authored
Update barrage.js
1 parent 274ed73 commit 8a8b874

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

barrage.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ const HEADERS = {
1313
};
1414
const PATH_SIZE = require("./path-sizes.json");
1515
const IDS = [];
16+
17+
const path = require("path");
18+
const BARRAGE_PATH = path.join(ROOT, "dist", "barrage.json");
19+
const INTERNAL_BARRAGE_PATH = path.join(ROOT, "dist", "barrage.internal.json");
20+
1621
exports.refreshBarrage = async function () {
1722
console.log("Refreshing Barrage");
1823
if (!fs.existsSync("./web/barrages")) fs.mkdirSync("./web/barrages");
@@ -27,6 +32,8 @@ exports.refreshBarrage = async function () {
2732
let published = await publish(barrages);
2833
fs.writeFileSync("barrage.json", JSON.stringify(published));
2934
fs.writeFileSync("barrage.formatted.json", JSON.stringify(published, null, 4));
35+
fs.writeFileSync(BARRAGE_PATH, JSON.stringify(published));
36+
fs.writeFileSync(INTERNAL_BARRAGE_PATH, JSON.stringify(published, null, 4));
3037
console.log("Done");
3138
};
3239

0 commit comments

Comments
 (0)