## Summary - rebuild `apps/website` on the pinned ScrewFast Astro foundation - replace the legacy page/content/component structure with the new section and UI architecture - add Starlight-based docs and the new public route set for platform, pricing, trust, legal, and guides - refresh website tooling, dependencies, and Playwright smoke coverage for the new site shell ## Scope - touches `apps/website` and the matching spec artifacts for feature 402 - does not modify `apps/platform` ## Testing - not run in this step Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #393
24 lines
598 B
JavaScript
24 lines
598 B
JavaScript
import fs from 'node:fs/promises';
|
|
import { globby } from 'globby';
|
|
import { minify } from 'html-minifier-terser';
|
|
|
|
// Get all HTML files from the output directory
|
|
const path = './dist';
|
|
const files = await globby(`${path}/**/*.html`);
|
|
|
|
await Promise.all(
|
|
files.map(async file => {
|
|
console.log('Processing file:', file);
|
|
let html = await fs.readFile(file, 'utf-8');
|
|
|
|
// Minify the HTML
|
|
html = await minify(html, {
|
|
removeComments: true,
|
|
preserveLineBreaks: true,
|
|
collapseWhitespace: true,
|
|
minifyJS: true,
|
|
});
|
|
await fs.writeFile(file, html);
|
|
})
|
|
);
|