mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-17 15:29:41 +02:00
refactor: restructure
monorepo with apps/ and services/ directories
This commit is contained in:
parent
25824ed0ac
commit
ff80aeec1f
4062 changed files with 2592 additions and 1278 deletions
|
|
@ -1,41 +0,0 @@
|
|||
import fs from 'fs';
|
||||
|
||||
// Read the markdown file
|
||||
const content = fs.readFileSync('docs/mail/email-templates-bilingual.md', 'utf8');
|
||||
|
||||
// Extract templates
|
||||
const templates = {};
|
||||
|
||||
// Find verification template
|
||||
const verificationMatch = content.match(/## 1\. E-Mail-Verifizierung.*?```html\n([\s\S]*?)```/);
|
||||
if (verificationMatch) {
|
||||
templates.verification = verificationMatch[1].trim();
|
||||
}
|
||||
|
||||
// Find password reset template
|
||||
const passwordMatch = content.match(/## 2\. Passwort-Reset.*?```html\n([\s\S]*?)```/);
|
||||
if (passwordMatch) {
|
||||
templates.passwordReset = passwordMatch[1].trim();
|
||||
}
|
||||
|
||||
// Find email change template
|
||||
const emailChangeMatch = content.match(/## 3\. E-Mail-Änderung.*?```html\n([\s\S]*?)```/);
|
||||
if (emailChangeMatch) {
|
||||
templates.emailChange = emailChangeMatch[1].trim();
|
||||
}
|
||||
|
||||
// Find OTP template
|
||||
const otpMatch = content.match(/## 4\. OTP.*?```html\n([\s\S]*?)```/);
|
||||
if (otpMatch) {
|
||||
templates.otp = otpMatch[1].trim();
|
||||
}
|
||||
|
||||
// Find login alert template
|
||||
const loginAlertMatch = content.match(/## 5\. Login-Alert.*?```html\n([\s\S]*?)```/);
|
||||
if (loginAlertMatch) {
|
||||
templates.loginAlert = loginAlertMatch[1].trim();
|
||||
}
|
||||
|
||||
// Save to JSON file
|
||||
fs.writeFileSync('email-templates.json', JSON.stringify(templates, null, 2));
|
||||
console.log('Templates extracted to email-templates.json');
|
||||
Loading…
Add table
Add a link
Reference in a new issue