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

boost

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boost

inline css into your html

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
34
decreased by-75.18%
Maintainers
1
Weekly downloads
 
Created
Source

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

  • none yet

Keywords

FAQs

Package last updated on 15 Jan 2013

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