boost

inline css into your html

npm install boost
9 downloads in the last week
18 downloads in the last month

boost

Given HTML, boost will inline your CSS properties into the style attribute.

boost builds on juice, making your email templating task Even More Convenient.

How to use

var boost = require('boost');
boost("/path/to/file.html", function(err, html) {
  console.log(html);
});

/path/to/file.html:

<html>
<head>
  <style>
    p { color: red; }
  </style>
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <p>Test</p>
</body>
</html>

style.css

p {
  text-decoration: underline;
}

Output:

<p style="color: red; text-decoration: underline;">Test</p>

What is this useful for ?

  • HTML emails. See juice
  • Embedding HTML in 3rd-party websites.

Why not just use juice directly ?

Because then you cannot take advantage of template inheritance with your css.

Projects using boost

npm loves you