htmlminifyify
v0.1.1
Published
HTML minfiy transform for browserify.
Downloads
2
Readme
htmlminifyify
require()
-able html file with a built in html minifier.
var menuHtml = require('./menu.html');
Installation
npm install htmlminifyify
Usage
Use as a standard browserify transform in package.json
, on the cli or programatically (like in a build tool).
Add to package.json
{
"name": "mypkg",
"version": "0.1.0",
"main": "main.js",
"browserify": {
"transform": [ "htmlminifyify" ]
}
}
CLI
browserify -t htmlminifyify entry.js > bundle.js
Programmatically
var gulp = require('gulp');
var browserify = require('browserify');
var htmlminifyify = require('htmlminifyify');
gulp.task('js', [], function () {
var b = browserify('./entry')
.transform(htmlminifyify)
.bundle()
.pipe(gulp.dest('./dist/js/app-bundle.js'));
return b;
});
Roadmap
- add string transforms for file extensions.