Files
Ivan Fontosh d1f180ee0a Initial TTRPG character meta-builder with visual sheet editor.
Offline Electron app seeds 10 system presets, supports create-from-scratch designer with palette/drag/resize/bricks, and exports .ttrpg-system.json for the player.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 14:49:31 +08:00

19 lines
726 B
JavaScript

#!/usr/bin/env node
/** Sync portable characterSheet module into dnd_player (meta_builder). */
import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const src = path.resolve(__dirname, '../app/shared');
const dest = path.resolve(__dirname, '../../dnd_player/app/shared/characterSheet');
fs.mkdirSync(dest, { recursive: true });
for (const file of fs.readdirSync(src)) {
if (!file.endsWith('.ts')) continue;
let text = fs.readFileSync(path.join(src, file), 'utf8');
text = text.replace(/from '\.\/([^']+)\.ts'/g, "from './$1'");
fs.writeFileSync(path.join(dest, file), text);
console.log('synced', file);
}