Skip to content

panosoft/html-inlinify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

html-inlinify

Embed local assets in an HTML document with browserify.

npm version npm license Travis David npm downloads

Installation

npm install html-inlinify

Usage

This browserify transform statically evaluates inline-html expressions in order to embed local assets referenced in an HTML document and bundle the results.

Assuming we have the following index.js:

var inlineHtml = require('inline-html');

inlineHtml('./index.html').then(function (html) {
  // ...
});

We can use browserify with the addition of this transform:

browserify -t html-inlinify index.js > bundle.js

To create the following bundle.js:

Promise.resolve('... html string with assets embedded ...').then(function (html) {
  // ...
});

About

Inline local assets referenced in an HTML document.

Resources

Stars

Watchers

Forks

Packages

No packages published