Ratatoskr/scripts/preview-config.js
Nibu 0ab0e77a20
Some checks failed
CLA Assistant / CLAssistant (pull_request_target) Failing after 1s
Build pull request / Build pull request (pull_request) Failing after 3m7s
Check PR title / lint (pull_request_target) Failing after 1s
scene: mount the background scene at the app root
BackgroundScene hosts the scene behind the app (fixed, z-index -1, tier off
renders nothing); mountBackgroundScene owns the async start/dispose race and
calls login() when a session already exists. Signed-out screens go transparent
while a scene runs. build:preview sets backgroundScene.tier low in dist.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 17:34:12 +00:00

12 lines
633 B
JavaScript

// Preview builds: set the background scene tier in dist/config.json (default 'low'); config.json
// in the repo stays 'off'. Usage: node scripts/preview-config.js [tier]
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
const tier = process.argv[2] ?? 'low';
const file = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'dist', 'config.json');
const config = JSON.parse(fs.readFileSync(file, 'utf8'));
config.backgroundScene = { ...config.backgroundScene, tier };
fs.writeFileSync(file, `${JSON.stringify(config, null, 2)}\n`);
console.log(`${file}: backgroundScene.tier = ${tier}`);