How to use the html-minifier/dist/htmlminifier.js.minify function in html-minifier

To help you get started, we’ve selected a few html-minifier examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github icons8 / impresser / lib / html / Compressor.js View on Github external
htmlMinify: function() {
    this.content = minify(this.content, {
      removeComments: true,
      removeCommentsFromCDATA: true,
      removeCDATASectionsFromCDATA: true,
      collapseWhitespace: true,
      collapseBooleanAttributes: true,
      removeAttributeQuotes: true,
      removeRedundantAttributes: true,
      removeStyleLinkTypeAttributes: true,
      keepClosingSlash: true,
      caseSensitive: true
    });
  },

html-minifier

Highly configurable, well-tested, JavaScript-based HTML minifier.

MIT
Latest version published 5 years ago

Package Health Score

65 / 100
Full package analysis