{"repo":"terser/html-minifier-terser","free":true,"listed":false,"github":"https://github.com/terser/html-minifier-terser","clone":"git clone https://github.com/terser/html-minifier-terser.git","description":"actively maintained fork of html-minifier - minify HTML, CSS and JS code using terser - supports ES6 code","language":"JavaScript","stars":477,"topics":["minify","uglify","compress","uglify-js","uglifyjs","terser","cli","es6","ecmascript6"],"license":"MIT","category":"cli-tools","readme_excerpt":"HTMLMinifier HTMLMinifier is a highly configurable , well-tested , JavaScript-based HTML minifier. Installation From NPM for use as a command line app: From NPM for programmatic use: Usage Note that almost all options are disabled by default. Experiment and find what works best for you and your project. For command line usage please see html-minifier-terser --help for a list of available options. Sample command line: Node.js See corresponding blog post for all the gory details of how it works, description of each option, testing results and conclusions. Also see corresponding Ruby wrapper, and for Node.js, Grunt plugin, Gulp plugin, Koa middleware wrapper and Express middleware wrapper. For lint-like capabilities take a look at HTMLLint. Minification comparison How does HTMLMinifier compare to other solutions — HTML Minifier from Will Peavy (1st result in Google search for \"html minifier\") as well as htmlcompressor.com and minimize? Site Original size (KB) HTMLMinifier minimize Will Peavy htmlcompressor.com ---------------------------------------------------------------------------- :------------------: -----------: -------: ---------: -----------------: Google 167 152 165 n/a n/a Twitter 214 195 214 n/a n/a Stack Overflow 233 179 191 n/a n/a Bootstrap CSS 271 260 269 n/a n/a HTMLMinifier 363 241 340 n/a n/a NBC 568 518 561 n/a n/a BBC 608 560 603 n/a n/a Wikipedia 860 698 832 n/a n/a Eloquent Javascript 870 815 840 n/a n/a Amazon 919 832 898 n/a n/a New York Times 1072 931 1","default_branch":null,"files":null,"tree":[],"storefront":"/r/terser","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/terser/html-minifier-terser/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}