@maizzle/framework
Version:
Maizzle is a framework that helps you quickly build HTML emails with Tailwind CSS.
39 lines (38 loc) • 1.52 kB
TypeScript
import { MaizzleConfig } from "../types/config.js";
import { TailwindBlock } from "../composables/renderContext.js";
//#region src/transformers/index.d.ts
/**
* Run all Maizzle transformers on the rendered HTML.
*
* The HTML is parsed into a DOM once at the start and passed through all
* DOM-based transformers as a shared `ChildNode[]`. After all DOM transformers
* complete, the DOM is serialized back to a string exactly once.
*
* String-only transformers (those that rely on external tools that require a
* raw HTML string) then run on the serialized output.
*
* Transformers run in a specific order:
* 0. Inline link stylesheets — replace `<link rel="stylesheet">` with `<style>` tags
* 1. Tailwind CSS — compile CSS, lower syntax, optimize (cleanup + merge media queries)
* 2. Safe class names
* 3. Attribute to style
* 4. CSS inliner
* 5. Remove attributes
* 6. Shorthand CSS
* 7. Six-digit HEX
* 8. Add attributes
* 9. Filters
* 10. Base URL
* 11. URL query
* 11.5 Entities in comment nodes (before purge — protects MSO conditionals)
* 12. Purge CSS (serializes/parses internally around email-comb)
* 13. Entities
* + Vue-generated comments stripped here (on serialized string)
* 14. Replace strings
* 15. Prettify
* 16. Minify
*/
declare function runTransformers(html: string, config: MaizzleConfig, filePath?: string, doctype?: string, tailwindBlocks?: TailwindBlock[]): Promise<string>;
//#endregion
export { runTransformers };
//# sourceMappingURL=index.d.ts.map