brfs-htmlmin
brfs-htmlmin
is kind of a fork of brfs.
It's a transform for browserify that allows you to use fs.readFileSync()
in your code and will statically inline the content in your bundle.
The difference is that with brfs-htmlmin
, it will minify the html output.
install
- Install
brfs-htmlmin
in your project:npm install brfs-htmlmin
- Use it as a transform, in the command line or with the API:
$ browserify -t brfs-htmlmin example/main.js > bundle.js
var browserify = ;var fs = ;var b = ;b;b;
example
for a main.js:
var fs = ;var html = fs;console;
and a doc.html:
A RMScreenprintMain heading in my document<!-- Note that it is "h" + "1", not "h" + the letters "one" -->Look Ma, I am coding HTML.
options
minify
Type: Object
Hash of options sent to the html-minifier. See github html-minifier by Kangax.
By defaults, these options are already true
:
removeComments: true,
collapseWhitespace: true,
collapseBooleanAttributes: true,
removeAttributeQuotes: true,
removeRedundantAttributes: true,
removeEmptyAttributes: true