2.1
New profile icons New profile higher position Updated Column toggle row Fixed text encoding
This commit is contained in:
@@ -181,7 +181,25 @@ async function build() {
|
||||
console.log(' -> fonts/ (' + fs.readdirSync(fontsDir).length + ' files)');
|
||||
}
|
||||
|
||||
// 7. Copy static files
|
||||
// 7. Copy images
|
||||
console.log(' Copying images...');
|
||||
const imagesDir = path.join(ROOT, 'assets', 'images');
|
||||
if (fs.existsSync(imagesDir)) {
|
||||
const copyDirRecursive = (src, dest) => {
|
||||
fs.mkdirSync(dest, { recursive: true });
|
||||
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
|
||||
const srcPath = path.join(src, entry.name);
|
||||
const destPath = path.join(dest, entry.name);
|
||||
if (entry.isDirectory()) copyDirRecursive(srcPath, destPath);
|
||||
else fs.copyFileSync(srcPath, destPath);
|
||||
}
|
||||
};
|
||||
copyDirRecursive(imagesDir, path.join(DIST, 'assets', 'images'));
|
||||
const imageCount = fs.readdirSync(path.join(imagesDir, 'profiles')).length;
|
||||
console.log(' -> assets/images/ (' + imageCount + ' profile images)');
|
||||
}
|
||||
|
||||
// 8. Copy static files
|
||||
console.log(' Copying static files...');
|
||||
for (const f of ['robots.txt', 'sitemap.xml', 'og-image.png']) {
|
||||
const src = path.join(ROOT, f);
|
||||
|
||||
Reference in New Issue
Block a user