Socket
Book a DemoInstallSign in
Socket

html-inlinify

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

html-inlinify

Embed local assets in an HTML document with browserify.

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

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 hmtl-inlinify index.js > bundle.js

To create the following bundle.js:

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

Keywords

browserify-transform

FAQs

Package last updated on 14 Oct 2015

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