2024-06-14 17:48:01 -04:00
|
|
|
const fs = require('fs-extra');
|
|
|
|
|
const path = require('path');
|
|
|
|
|
const server = require('@gridspace/app-server');
|
|
|
|
|
|
2025-11-15 17:33:32 -05:00
|
|
|
const altTmp = path.join('tmp','alt');
|
|
|
|
|
fs.copySync("alt", altTmp, { dereference: true });
|
|
|
|
|
|
2024-06-16 21:48:41 -04:00
|
|
|
// deref src, web, mod for windows
|
2024-06-14 17:48:01 -04:00
|
|
|
const srcTmp = path.join('tmp','src');
|
2025-11-12 23:29:36 -05:00
|
|
|
fs.copySync("src", srcTmp, { dereference: true, filter:(src) => {
|
2025-11-15 17:33:32 -05:00
|
|
|
return true || src.indexOf('src/main') < 0;
|
2025-11-12 23:29:36 -05:00
|
|
|
} });
|
2024-06-14 17:48:01 -04:00
|
|
|
|
|
|
|
|
const webTmp = path.join('tmp','web');
|
2025-11-12 23:29:36 -05:00
|
|
|
fs.copySync("web", webTmp, { dereference: true, filter:(src) => {
|
|
|
|
|
return src.indexOf('web/boot') < 0;
|
|
|
|
|
} });
|
2024-06-14 17:48:01 -04:00
|
|
|
|
2024-06-16 21:48:41 -04:00
|
|
|
const modTmp = path.join('tmp','mod');
|
2025-02-04 16:59:06 -05:00
|
|
|
if (fs.existsSync("mod"))
|
|
|
|
|
fs.copySync("mod", modTmp, { dereference: true, filter:(src,dst) => {
|
2025-11-12 23:29:36 -05:00
|
|
|
const ok = src === 'mod' || src.indexOf('mod/standalone') === 0;
|
2025-02-02 16:10:05 -05:00
|
|
|
return ok;
|
|
|
|
|
} });
|
|
|
|
|
|
|
|
|
|
const modsTmp = path.join('tmp','mods');
|
|
|
|
|
fs.copySync("mods", modsTmp, { dereference: true, filter:(src,dst) => {
|
2025-11-12 23:29:36 -05:00
|
|
|
const ok = src === 'mods' || src.indexOf('mods/bambu') === 0;
|
2024-06-16 21:48:41 -04:00
|
|
|
return ok;
|
|
|
|
|
} });
|
2024-06-16 15:53:19 -04:00
|
|
|
|
2024-06-16 21:48:41 -04:00
|
|
|
// create minified asset cache
|
2025-07-07 22:29:45 -04:00
|
|
|
// server({
|
|
|
|
|
// electron: true,
|
|
|
|
|
// dryrun: true,
|
|
|
|
|
// single: true
|
|
|
|
|
// });
|