seogeneratorserver/tests/setup-env.js
StillHammer dbf1a3de8c Add technical plan for multi-format export system
Added plan.md with complete architecture for format-agnostic content generation:
- Support for Markdown, HTML, Plain Text, JSON formats
- New FormatExporter module with neutral data structure
- Integration strategy with existing ContentAssembly and ArticleStorage
- Bonus features: SEO metadata generation, readability scoring, WordPress Gutenberg format
- Implementation roadmap with 4 phases (6h total estimated)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 16:14:29 +08:00

14 lines
490 B
JavaScript

// tests/setup-env.js
import fs from 'fs';
import path from 'path';
const p = path.join(process.cwd(), '.env');
if (fs.existsSync(p)) {
// lazy dotenv sans dépendance: Node 20+ ne charge pas .env nativement,
// tu peux installer 'dotenv' si tu préfères.
const lines = fs.readFileSync(p, 'utf8').split(/\r?\n/);
for (const line of lines) {
const m = line.match(/^\s*([A-Z0-9_]+)\s*=\s*(.*)\s*$/i);
if (m) process.env[m[1]] = m[2].replace(/^"|"$/g, '');
}
}