Socket
Book a DemoInstallSign in
Socket

inline

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inline

inline all images, stylesheets and scripts of a webpage

latest
Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
7
-41.67%
Maintainers
1
Weekly downloads
 
Created
Source

#node-inline

inline all images, stylesheets and scripts of a webpage.

This is a (partial) port of remy/node-inliner to my htmlparser2 module.

####installation

npm i inline

####usage

var Inline = require("inline"),
    minreq = require("minreq");

minreq.get("http://feedic.com/").pipe(
  new Inline("http://feedic.com/", {
    //default options:
    images: true, //inline images
    scripts: true, //inline scripts
    stylesheets: true //inline stylesheets
  }, function(err, data){
    if(err) throw err;
    require("fs").writeFileSync("index.html", data);
  }
));

####todo

inline currently doesn't minify inlined scripts & stylesheets, and also doesn't support gzip compressed sources. At least support for gzip compression is planned.

License: BSD-like

FAQs

Package last updated on 04 May 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