Replace Handlebars with flexible template engine system

- Replace handlebars dependency with optional liquidjs and mustache
- Add templateEngine string configuration ('liquidjs', 'mustache', 'simple')
- Add custom templateRenderer hook for maximum flexibility
- Implement graceful fallbacks when optional dependencies unavailable
- Fix webpack compatibility issues with require.extensions
- Maintain backward compatibility with existing templates
- Add comprehensive template syntax documentation

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-13 17:51:25 +02:00
parent 243f7c96cf
commit dc3c4fdb44
5 changed files with 295 additions and 81 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@xtr-dev/payload-mailing",
"version": "0.0.8",
"version": "0.0.9",
"description": "Template-based email system with scheduling and job processing for PayloadCMS",
"type": "module",
"main": "dist/index.js",
@@ -47,9 +47,12 @@
"payload": "^3.37.0"
},
"dependencies": {
"handlebars": "^4.7.8",
"nodemailer": "^6.9.8"
},
"optionalDependencies": {
"liquidjs": "^10.19.0",
"mustache": "^4.2.0"
},
"devDependencies": {
"@eslint/eslintrc": "^3.2.0",
"@payloadcms/db-mongodb": "^3.37.0",