Comparing version 1.0.17 to 1.0.18
@@ -47,2 +47,3 @@ "use strict"; | ||
textVersion, | ||
htmlVersion, | ||
templateOptions | ||
@@ -76,3 +77,4 @@ } = config; | ||
try { | ||
import_fs.default.writeFileSync(import_path.default.join(folderEmailPathLang, "index.html"), html, { | ||
const fileName = htmlVersion ? htmlVersion(emailName, locale) : "index.html"; | ||
import_fs.default.writeFileSync(import_path.default.join(folderEmailPathLang, fileName), html, { | ||
encoding: "utf-8" | ||
@@ -79,0 +81,0 @@ }); |
@@ -5,2 +5,3 @@ import { MJMLParsingOptions } from "mjml-core"; | ||
outputFolder: string; | ||
htmlVersion?: (emailName: string, locale: string) => string; | ||
textVersion?: (emailName: string, locale: string) => string; | ||
@@ -7,0 +8,0 @@ templateOptions?: { |
{ | ||
"name": "marilena", | ||
"version": "1.0.17", | ||
"version": "1.0.18", | ||
"description": "a tool to build emails with cool tools like mjml and different template engine like handlebars or eta.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -44,3 +44,4 @@ # Intro | ||
outputFolder: "./output", | ||
textVersion: (emailName, locale) => `${emailName}_text_version-${locale}.txt`, | ||
textVersion: (emailName, locale) => `${emailName}_text_version-${locale}.txt`, // is optional | ||
htmlVersion: (emailName, locale) => `${emailName}-custom.html`, // is optional | ||
locales: ["it", "en"], | ||
@@ -124,2 +125,3 @@ templateOptions: { | ||
| mjmlParsingOptions | | options passed to mjml render. See: [mjml options](https://www.npmjs.com/package/mjml) | | ||
| htmlVersion | | function of type `(emailName: string, locale: string) => string`. If set, this function allow to customize html version. The function must return file name `es: ${emailName}-${locale}.html` | index.html | | ||
| textVersion | | function of type `(emailName: string, locale: string) => string`. If set, this function allow to generate text version of email stripping all html. The function must return file name `es: ${emailName}-${locale}-text-version.txt` | | ||
@@ -193,1 +195,3 @@ | ||
- [ ] fast-refresh on config change | ||
- [ ] snaphost test for each email | ||
- [ ] refactor to esm instead common js |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
69943
1438
195
29