Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mattpuchlerz-liquid_premailer

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mattpuchlerz-liquid_premailer

  • 0.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= Liquid Premailer

Developed by Matt Puchlerz, The Killswitch Collective (http://killswitchcollective.com) 02.10.2009

As awesome as the Premailer gem is, it didn't help with making Liquid templates any easier. My idea was to create a simple, consistent method by which you could write your markup, style it, premailer-it, and have the associated Liquid calls right there as well.

Using liquid_premailer on the command line will convert your source HTML file, filled with dummy data and commented-out Liquid calls, into ready-to-go Liquid email templates.

== Examples

=== Using the liquid_premailer Command

$ liquid_premailer myfile.html

...will output myfile_liquid.html. That's it!

=== Dummy Data and Hidden Liquid Output

h1 { font-family: verdana, sans-serif; font-size: 20px; }

Here is a Fake Headline

...will become...

{{ email.headline }}

=== Hidden Liquid Tags

Man, HTML emails are a pain to work with.

...will become...

{% if email.is_a_pain %}

Man, HTML emails are a pain to work with.

{% endif %}

=== Complex Example

p { font-family: verdana, sans-serif; font-size: 12px; } span.phone { color: red; }

123-456-7890
098-765-4321 (mobile)

...will become...

{% if sender.phone != blank %} {{ sender.phone }}
{% endif %} {% if sender.mobile_phone != blank %} {{ sender.mobile_phone }} (mobile) {% endif %}

== Requirements, installation and use

First, download and install the Premailer gem from http://code.dunae.ca/premailer.web/local.html.

Then install the liquid_premailer gem:

$ sudo gem install mattpuchlerz-liquid_premailer

liquid_premailer should now be available in your path.

FAQs

Package last updated on 11 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc