Add tabular description of options #131

Closed
matthewwithanm opened this Issue Mar 7, 2014 · 3 comments

Projects

None yet

2 participants

@matthewwithanm
Contributor

The blog post is informative, but it leaves you having to scroll through a lot of prose just to get a list of options. This is especially problematic given that every optimization defaults to false, making the minifier essentially one big no-op by default.

@kangax
Owner
kangax commented Mar 8, 2014

Definitely a good idea, thanks! Does the list on the right on this page help? http://kangax.github.io/html-minifier/

@matthewwithanm
Contributor

I don't think so since it doesn't actually include the option names. I was thinking just something like this:

Option Description Default
removeComments Strip HTML comments false
removeCommentsFromCDATA Strip HTML comments from scripts and styles false
removeCDATASectionsFromCDATA Remove CDATA sections from script and style elements false
collapseWhitespace Collapse white space that contributes to text nodes in a document tree. false
collapseBooleanAttributes Omit attribute values from boolean attributes false
removeAttributeQuotes Remove quotes around attributes when possible. false
removeRedundantAttributes Remove attributes when value matches default. false
useShortDoctype Replaces the doctype with the short (HTML5) doctype false
removeEmptyAttributes Remove all attributes with whitespace-only values false
removeOptionalTags Remove unrequired tags false
removeEmptyElements Remove all elements with empty contents false
lint Toggle linting false

I'd have submitted a PR but I'm not sure where would make the most sense.

@kangax
Owner
kangax commented Mar 10, 2014

That looks good. We can just plug this into README.

@kangax kangax closed this in 9802dfe Mar 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment