summaryrefslogtreecommitdiff
path: root/app/build.js
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-08-26 22:29:23 +0200
committerMinteck <contact@minteck.org>2022-08-26 22:29:23 +0200
commit09bd0164ebc020a54b944b7326dcba496fb5d82c (patch)
tree0c5e765e627ecc94e534ccb6e2bc83917d58dc4c /app/build.js
parenta2df9a69dcc14cb70118cda2ded499055e7ee358 (diff)
downloadpluralconnect-09bd0164ebc020a54b944b7326dcba496fb5d82c.tar.gz
pluralconnect-09bd0164ebc020a54b944b7326dcba496fb5d82c.tar.bz2
pluralconnect-09bd0164ebc020a54b944b7326dcba496fb5d82c.zip
idk when was the last commit so I'm making a new one - Violet Dawn
Diffstat (limited to 'app/build.js')
-rw-r--r--app/build.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/app/build.js b/app/build.js
index f31e572..9d9b8fc 100644
--- a/app/build.js
+++ b/app/build.js
@@ -2,7 +2,12 @@ const fs = require('fs');
let original = fs.readFileSync("./sw.src.js").toString();
let fileList = [
- "/app/"
+ "/app/",
+ "/-/demo",
+ "https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css",
+ "https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js",
+ "/assets/logo/logo.png",
+ "/assets/icons/right.svg"
];
function files(dir, sdir) {
for (let file of fs.readdirSync(dir)) {
@@ -20,7 +25,13 @@ function files(dir, sdir) {
files(".", "/app");
console.log(JSON.stringify(fileList, null, 2));
+let fileList1 = fileList;
-original = original.replace('[["%CacheData%"]]', JSON.stringify(fileList, null, 4));
+fileList = [];
+files("../assets/uploads", "/assets/uploads");
+console.log(JSON.stringify(fileList, null, 2));
+let fileList2 = fileList;
+
+original = original.replace('[["%CacheData%"]]', JSON.stringify([...fileList1, ...fileList2], null, 4));
fs.writeFileSync("./sw.js", fs.readFileSync("./localforage.js") + "\n\n" + original); \ No newline at end of file