add seymour icons
This commit is contained in:
@@ -156,13 +156,8 @@ async function createOptimizedBuild() {
|
||||
// Step 5: Copy assets and SEO files
|
||||
console.log('📁 Step 5: Copying assets and SEO files...');
|
||||
try {
|
||||
const assets = await fs.readdir('public/assets');
|
||||
for (const asset of assets) {
|
||||
await fs.copyFile(
|
||||
path.join('public/assets', asset),
|
||||
path.join('dist/assets', asset)
|
||||
);
|
||||
}
|
||||
await copyDirectoryRecursive('public/assets', 'dist/assets');
|
||||
console.log(' ✅ Assets directory copied recursively');
|
||||
} catch (err) {
|
||||
console.log(' No assets directory found, skipping...');
|
||||
}
|
||||
@@ -296,6 +291,27 @@ async function bundleAndMinifyJS() {
|
||||
}
|
||||
}
|
||||
|
||||
async function copyDirectoryRecursive(src, dest) {
|
||||
// Create destination directory if it doesn't exist
|
||||
await fs.mkdir(dest, { recursive: true });
|
||||
|
||||
// Read all items in source directory
|
||||
const entries = await fs.readdir(src, { withFileTypes: true });
|
||||
|
||||
for (const entry of entries) {
|
||||
const srcPath = path.join(src, entry.name);
|
||||
const destPath = path.join(dest, entry.name);
|
||||
|
||||
if (entry.isDirectory()) {
|
||||
// Recursively copy subdirectories
|
||||
await copyDirectoryRecursive(srcPath, destPath);
|
||||
} else {
|
||||
// Copy files
|
||||
await fs.copyFile(srcPath, destPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function minifyHTMLFile(inputPath, outputPath) {
|
||||
const html = await fs.readFile(inputPath, 'utf8');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user