A mimosa module to minify html
JavaScript
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
.npmignore
README.md
mimosa-config.js
package.json

README.md

mimosa-minify-html

Overview

This module uses html-minifier to minify .html files.

For more information regarding Mimosa, see http://mimosa.io.

Usage

Add 'minify-html' to your list of modules. That's all! Mimosa will install the module for you when you start mimosa watch or mimosa build.

Functionality

During mimosa build and mimosa watch, when the --minify flag is enabled, this module will optimize .html files.

Default Config

minifyHtml: {
  options: {}
}
  • options an object, pass-through options to the html-minifier library.

Check the Option Reference on the html-minify website for details on the following options:

  • collapseWhitespace
  • useShortDoctype
  • removeComments
  • removeCommentsFromCDATA
  • removeCDATASectionsFromCDATA
  • removeEmptyAttributes
  • cleanAttributes
  • removeRedundantAttributes
  • removeAttributeQuotes
  • removeScriptTypeAttributes
  • removeStyleLinkTypeAttributes
  • removeEmptyElements
  • collapseBooleanAttributes
  • keepClosingSlash
  • removeOptionalTags
  • html5
  • removeIgnored
  • caseSensitive