techveda-react-seo
Version:
Complete React SEO automation library with meta tags, robots.txt and sitemap generation
15 lines (13 loc) • 476 B
text/typescript
// import fs from 'fs';
// import path from 'path';
// export function ensureDirectoryExists(filePath: string) {
// const dir = path.dirname(filePath);
// if (!fs.existsSync(dir)) {
// fs.mkdirSync(dir, { recursive: true });
// }
// }
// export function writeFileSyncSafe(filePath: string, content: string) {
// ensureDirectoryExists(filePath);
// fs.writeFileSync(filePath, content.trim(), 'utf-8');
// console.log(`✅ File generated at ${filePath}`);
// }