0.1.1 • Published 2 years ago

mailwindi v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

❓ 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:

<!-- input.html -->
<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