mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
Update generate-asset-manifest.js
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { readdirSync, writeFileSync, mkdirSync } from 'fs';
|
||||
import { join, dirname } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { execSync } from 'child_process';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
@@ -56,6 +57,13 @@ mkdirSync(generatedDir, { recursive: true });
|
||||
const outputPath = join(generatedDir, 'asset-manifest.ts');
|
||||
writeFileSync(outputPath, output, 'utf8');
|
||||
|
||||
// Format with oxfmt so output matches committed (formatted) version
|
||||
try {
|
||||
execSync(`npx oxfmt ${outputPath}`, { stdio: 'ignore' });
|
||||
} catch {
|
||||
// oxfmt not available (e.g. CI without devDependencies), skip formatting
|
||||
}
|
||||
|
||||
console.log(
|
||||
`✅ Generated asset manifest with ${banners.length} banners, ${notFoundImages.length} not-found images, ${buttonImages.length} button images, and ${themeBackgrounds.length} background images`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user