Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace premailer #3

Open
derekrushforth opened this issue Aug 18, 2016 · 6 comments
Open

Replace premailer #3

derekrushforth opened this issue Aug 18, 2016 · 6 comments
Assignees

Comments

@derekrushforth
Copy link
Contributor

We should replace premailer with something that's fully compatible through node. Requiring gems to be installed is kind of a mess.

@derekrushforth derekrushforth self-assigned this Aug 18, 2016
@garrettdimon
Copy link
Contributor

Looks like 'emailify' is a Node-friendly alternative. Not sure if it has feature parity, though.

@derekrushforth
Copy link
Contributor Author

Emailify looks awesome but their Github page says it's not actively maintained.

@derekrushforth
Copy link
Contributor Author

derekrushforth commented Aug 19, 2016

I guess all we're really looking for is this:

  • CSS inlining
    • Must preserve style tag
  • Generate text versions
  • Remove CSS selectors that aren't being actively used in the HTML template.(premailer didn't do this)

Pluses but not deal breakers:

  • Set cellpadding, cellspacing, width table attributes from within CSS declarations.
  • Compatibility warnings - A nice option for some people.

There may be standalone grunt plugins that do each of these things.

@garrettdimon
Copy link
Contributor

Found this, but since you know more about the intricacies, it's probably easier for you to evaluate whether it will do the trick to replace premailer. It's under Automattic, and it seems actively maintained.

https://github.com/Automattic/juice

@landsman
Copy link

Did you found any better solution?

@dprensha
Copy link

dprensha commented Nov 21, 2022

It doesn't look like juice will generate text versions of an email. But there is a library out there that will do this:

https://www.npmjs.com/package/html-to-text

Side question, why is it necessary to inline in the build process when Postmark does that for us server-side? If we left that for the server then only a html-to-text tool would be needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants