📫
mailwindi
WindiCSS Email template compiler
❓ What?
Creating HTML email template has, and probably always will, be a pain.
This package is designed to try & make it a bit easier to use by letting you use WindiCSS to handle styles for your email templates.
👶 Example
A basic example to show how it works:
<html>
<body>
<p class="font-bold text-lg">Welcome</p>
</body>
</html>
Run the following command:
mailwindi -i input.html
And will generate the following inlined HTML file:
<html>
<body>
<p class="font-bold text-lg" style="font-size: 18px; font-weight: 700;">
Welcome
</p>
</body>
</html>
🚀 Install
Install the CLI globally
npm i -g mailwindi
Or use npx
npx mailwindi
🦄 Usage
Design your email template in plain HTML & WindiCSS utility classes like you normally would for the web.
Then run the following command to generate the same email template but with all styles inlined.
mailwind -i input.html
🔧 Options
--input
: Input file path
- Alias:
-i
- Default:
index.html
- Optional:
true
--minify
: Output file path
- Alias:
-m
- Default:
[NAME]-inline.html
- Optional:
true
--config
: Config file path
- Alias:
-c
- Default:
./windi.config.js
- Optional:
true
❤️ Credits