Auto-deploy: 2026-08-05 16:17:53
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env node
|
||||
// sync_profile.js — regenerate server/profile.json from profile_data.js
|
||||
// Run this after ANY edit to profile_data.js: node sync_profile.js
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { PROFILE_DATA, renderProfileText } = require('./profile_data.js');
|
||||
|
||||
const target = path.join(__dirname, 'server', 'profile.json');
|
||||
const payload = Object.assign({}, PROFILE_DATA, {
|
||||
_generated: 'AUTO-GENERATED from profile_data.js — do not edit by hand. Run: node sync_profile.js',
|
||||
_generatedAt: new Date().toISOString(),
|
||||
profileText: renderProfileText()
|
||||
});
|
||||
|
||||
fs.writeFileSync(target, JSON.stringify(payload, null, 2));
|
||||
console.log(`✅ Synced ${target} (${fs.statSync(target).size} bytes)`);
|
||||
Reference in New Issue
Block a user