Because cats have 9 lives, but servers don't - so they need backup-restore! Complete backup solution with S3/MinIO support. - Full WordPress backup (files + database) - S3 / MinIO / S3-compatible storage backends - Scheduled automatic backups - Disaster recovery / one-click restore - Backup integrity validation - Cat-themed admin interface Includes build.sh and .distignore for WordPress-installable release ZIPs.
54 lines
1.5 KiB
JavaScript
54 lines
1.5 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
/**
|
|
* WordPress-specific build script for TigerStyle Life9
|
|
*
|
|
* This script compiles Astro pages into WordPress-compatible HTML and assets
|
|
*/
|
|
|
|
import { fileURLToPath } from 'url';
|
|
import { dirname, join } from 'path';
|
|
import { readFileSync, writeFileSync, mkdirSync, existsSync } from 'fs';
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = dirname(__filename);
|
|
|
|
const srcDir = join(__dirname, 'src/astro/pages');
|
|
const outDir = join(__dirname, 'admin/assets/dist');
|
|
|
|
// Ensure output directory exists
|
|
if (!existsSync(outDir)) {
|
|
mkdirSync(outDir, { recursive: true });
|
|
}
|
|
|
|
// Create a simple manifest for WordPress
|
|
const manifest = {
|
|
'admin-dashboard.html': {
|
|
isEntry: true,
|
|
src: 'src/astro/pages/admin-dashboard.astro'
|
|
},
|
|
'backup.html': {
|
|
isEntry: true,
|
|
src: 'src/astro/pages/backup.astro'
|
|
},
|
|
'restore.html': {
|
|
isEntry: true,
|
|
src: 'src/astro/pages/restore.astro'
|
|
},
|
|
'settings.html': {
|
|
isEntry: true,
|
|
src: 'src/astro/pages/settings.astro'
|
|
}
|
|
};
|
|
|
|
// Write manifest
|
|
writeFileSync(
|
|
join(outDir, 'manifest.json'),
|
|
JSON.stringify(manifest, null, 2)
|
|
);
|
|
|
|
console.log('✅ WordPress build manifest created!');
|
|
console.log('📁 Files in output directory:', outDir);
|
|
console.log('📄 Manifest created with page entries');
|
|
console.log('\nNote: For now, Astro pages will be rendered server-side by WordPress.');
|
|
console.log('The PHP admin class will handle loading and rendering the .astro files.'); |