copy jszip from vendor zo public

This commit is contained in:
2026-05-12 19:07:02 +02:00
parent c74f11794d
commit 824170eaea
4 changed files with 30 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ WORKDIR /opt/f0ckm
COPY . . COPY . .
RUN npm i RUN npm i
RUN npm run copy-vendor
RUN npm run build RUN npm run build
ENTRYPOINT ["npm", "run", "start"] ENTRYPOINT ["npm", "run", "start"]

View File

@@ -14,6 +14,7 @@
"clean": "node debug/clean.mjs", "clean": "node debug/clean.mjs",
"fix:deleted": "node debug/fix_deleted.mjs", "fix:deleted": "node debug/fix_deleted.mjs",
"build": "node scripts/build-css.mjs", "build": "node scripts/build-css.mjs",
"copy-vendor": "node scripts/copy-vendor.mjs",
"seed": "node scripts/seed.mjs", "seed": "node scripts/seed.mjs",
"create-admin": "node scripts/create-admin.mjs" "create-admin": "node scripts/create-admin.mjs"
}, },

13
public/s/js/jszip.min.js vendored Normal file

File diff suppressed because one or more lines are too long

15
scripts/copy-vendor.mjs Normal file
View File

@@ -0,0 +1,15 @@
import fs from 'fs';
import path from 'path';
// Copies vendor browser bundles from node_modules into public/s/js/
const vendors = [
{ src: 'jszip/dist/jszip.min.js', dest: 'public/s/js/jszip.min.js' },
];
for (const { src, dest } of vendors) {
const srcPath = path.join(process.cwd(), 'node_modules', src);
const destPath = path.join(process.cwd(), dest);
fs.copyFileSync(srcPath, destPath);
const size = fs.statSync(destPath).size;
console.log(`Copied: ${src} -> ${dest} (${size} bytes)`);
}