Socket
Book a DemoInstallSign in
Socket

inlineresources

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inlineresources

Inlines style sheets, images, fonts and scripts in HTML documents. Works in the browser.

1.0.1
latest
Source
npmnpm
Version published
Weekly downloads
31K
-0.09%
Maintainers
1
Weekly downloads
 
Created
Source

inlineresources

NPM version

Inlines style sheets, images, fonts and scripts in HTML documents. Works in the browser.

See the API.

Install

$ npm install inlineresources

and require through browserify or webpack.

Alternatively use a standalone bundle via e.g. https://wzrd.in/standalone/inlineresources@latest.

Limitations

Resources referenced in the document (CSS, images, fonts and JS) can only be loaded if from the same origin, unless techniques like CORS are used.

Yet to be supported:

  • Background images in inline style declarations (<div style="...">)
  • Media queries defined on link elements (<link rel="stylesheet" media="..." />)
  • Media queries defined on import rules (@import url("...") screen and (orientation:landscape);)
  • Future responsive img solution (<img srcset="...">)

Similar projects for Node.js

Development

For linting, tests and a browser build install Node.js and run

$ npm install && npm test

Check ./dist/ for the browserified builds.

To test against several browsers while editing, run grunt testWatch and point those browsers to http://localhost:9989/.

Build Status

Where is it used?

Author

Christoph Burgmer. Licensed under MIT. Reach out on Twitter.

Keywords

inline

FAQs

Package last updated on 25 Oct 2020

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.