Merge remote-tracking branch 'origin/nibu/scene-host' into void/preview-all
This commit is contained in:
commit
0f79ce2c4e
7 changed files with 224 additions and 1 deletions
12
scripts/preview-config.js
Normal file
12
scripts/preview-config.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
// 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}`);
|
||||
Loading…
Reference in a new issue