@ndcode/html-minifier
v3.5.22
Published
Highly configurable, well-tested, JavaScript-based HTML minifier (added NDCODE hooks)
Downloads
2
Maintainers
Readme
HTML minifier based on existing NPM package (added NDCODE hooks)
An NDCODE project.
Overview
This is a minor modification to the NPM html-minifier
package version 3.5.21.
For the complete usage information, please see the original documentation at:
https://www.npmjs.com/package/html-minifier.
We gratefully acknowledge the authors for their MIT-licensing the package.
Modifications
We've changed the uglify-js
dependency to uglify-es
, which adds support for
ES7 features like async
/await
in the minification of embedded JavaScript.
We've also changed the clean-css
dependency to @ndcode/clean-css
, which
behaves exactly the same but avoids loading the clean-css
dependency twice in
packages that depend on both @ndcode/html-minifier
and @ndcode/clean-css
.
Suppose this package is imported as
let html_minifier = require('@ndcode/html-minifier')
,
in addition to the usual html_minifier.minify()
function, we've also exported
the internal HTML parser constructor, so that parsers can be instanstiated as
new html_minifier.HTMLParser(...)
,
with arguments as shown in the existing code. This is for our jstize
package.
GIT repository
The development version can be cloned, downloaded, or browsed with gitweb
at:
https://git.ndcode.org/public/html-minifier.git
License
All of our NPM packages are MIT licensed, please see LICENSE in the repository.
Contributions
Feedback on NDCODE packages and/or code contributions are gratefully welcomed.
Contact: Nick Downing [email protected]