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>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#!/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);
|
||||
}
|
||||
Reference in New Issue
Block a user