Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Inlines style sheets, images, fonts and scripts in HTML documents.
JavaScript Shell HTML
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
src
test
.gitignore
.npmignore
.travis.yml
Gruntfile.js
README.md
go
package.json

README.md

inlineresources

NPM version

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

See the API.

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

$ ./go

Check ./dist/ for the browserified builds.

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

Build Status

Where is it used?

Author

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

Something went wrong with that request. Please try again.