Giter Club home page Giter Club logo

inline-email's Introduction

Build Status dependencies Status

Inline Email - CLI

A CLI for converting HTML files to inline styled HTML suitable for emails. The CLI also supports Inky HTML-based templating using --inky as an argument. The CLI is designed to make working with ExactTarget, MailChimp, Emarsys, or any other email service easier if you're simply pasting the output into those systems.

Supported NodeJS Versions

NodeJS 6.x -> 9.x are supported. Older NodeJS will not work with this package.

What this does not do.

inline-email does NOT check you're using email safe HTML tags. It also won't replace any non-safe tags.

Installation

npm install -g inline-email

Usage

By default inline-email resolves <link> and <style> tags and inlines the styles found within after which it removes the <link> and <style> tags from the HTML. This process is done using Juice. Currently not all of Juice's options can be passed through the CLI, though it will use the appropriate Juice function to handle your HTML input depending on if you provided css or not.

You can simple print the output to the console.

$ inline-email some.html
> your-html-to-stdout

Or you can send it to a file.

$ inline-email some.html --out inlined.html

If you wish to pass in a .css files (or files) on your own (if your HTML doesn't have <link> or <style> tags) you can. Note that if the file does have these tags they will be ignored and the passed in files will be used instead.

$ inline-email --css some.css --out inlined.html some.html

Inky Usage

With --inky nothing changes, but the HTML file is pre-proccessed through Inky. All the other agruments operate exactly the same.

$ inline-email --inky inky.html
> your-slightly-different-inkyish-output

Contributing with new features

Want to contribute? Follow these recommendations.

License

MIT

inline-email's People

Contributors

dansabin avatar sabind avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.