1.3.0 • Published 7 years ago

html2js-browserify v1.3.0

Weekly downloads
366
License
BSD-2-Clause
Repository
github
Last release
7 years ago

Turn crummy HTML into beautiful Javascript

npm install html2js-browserify

How?

some.html

<html><body><h1>dude!</h1></body></html>

app.js

var html = require('./some.html');
console.log(html);

Then

# browserify -t html2js-browserify app.js

Options

  • minify if set to true, will minify the HTML. All other options are passed through to html-minifier.

    browserify -t [html2js-browserify --minify --collapseWhitespace] app.js