cli.setUsage(usage);
var mainOptions = {
- removeComments: [[false, 'Strip HTML comments']],
- removeCommentsFromCDATA: [[false, 'Strip HTML comments from scripts and styles']],
- removeCDATASectionsFromCDATA: [[false, 'Remove CDATA sections from script and style elements']],
+ caseSensitive: [[false, 'Treat attributes in case sensitive manner (useful for SVG; e.g. viewBox)']],
+ collapseBooleanAttributes: [[false, 'Omit attribute values from boolean attributes']],
+ collapseInlineTagWhitespace: [[false, 'Collapse white space around inline tag']],
collapseWhitespace: [[false, 'Collapse white space that contributes to text nodes in a document tree.']],
conservativeCollapse: [[false, 'Always collapse to 1 space (never remove it entirely)']],
+ customAttrAssign: [[false, 'Arrays of regex\'es that allow to support custom attribute assign expressions (e.g. \'<div flex?="{{mode != cover}}"></div>\')', 'string'], 'json-regex'],
+ customAttrCollapse: [[false, 'Regex that specifies custom attribute to strip newlines from (e.g. /ng\-class/)', 'string'], 'string-regex'],
+ customAttrSurround: [[false, 'Arrays of regex\'es that allow to support custom attribute surround expressions (e.g. <input {{#if value}}checked="checked"{{/if}}>)', 'string'], 'json-regex'],
+ customEventAttributes: [[false, 'Arrays of regex\'es that allow to support custom event attributes for minifyJS (e.g. ng-click)', 'string'], 'json-regex'],
+ html5: [[false, 'Parse input according to HTML5 specifications']],
+ ignoreCustomComments: [[false, 'Array of regex\'es that allow to ignore certain comments, when matched', 'string'], 'json-regex'],
+ ignoreCustomFragments: [[false, 'Array of regex\'es that allow to ignore certain fragments, when matched (e.g. <?php ... ?>, {{ ... }})', 'string'], 'json-regex'],
+ includeAutoGeneratedTags: [[false, 'Insert tags generated by HTML parser'], true],
+ keepClosingSlash: [[false, 'Keep the trailing slash on singleton elements']],
+ lint: [[false, 'Toggle linting']],
+ maxLineLength: [[false, 'Max line length', 'number'], true],
+ minifyCSS: [[false, 'Minify CSS in style elements and style attributes (uses clean-css)']],
+ minifyJS: [[false, 'Minify Javascript in script elements and on* attributes (uses UglifyJS)']],
+ minifyURLs: [[false, 'Minify URLs in various attributes (uses relateurl)', 'string'], 'site-url'],
preserveLineBreaks: [[false, 'Always collapse to 1 line break (never remove it entirely) when whitespace between tags include a line break.']],
- collapseInlineTagWhitespace: [[false, 'Collapse white space around inline tag']],
- collapseBooleanAttributes: [[false, 'Omit attribute values from boolean attributes']],
- removeTagWhitespace: [[false, 'Remove space between attributes whenever possible.']],
- removeAttributeQuotes: [[false, 'Remove quotes around attributes when possible.']],
- removeRedundantAttributes: [[false, 'Remove attributes when value matches default.']],
preventAttributesEscaping: [[false, 'Prevents the escaping of the values of attributes.']],
- useShortDoctype: [[false, 'Replaces the doctype with the short (HTML5) doctype']],
+ processConditionalComments: [[false, 'Process contents of conditional comments through minifier']],
+ processScripts: [[false, 'Array of strings corresponding to types of script elements to process through minifier (e.g. "text/ng-template", "text/x-handlebars-template", etc.)', 'string'], 'json'],
+ quoteCharacter: [[false, 'Type of quote to use for attribute values (\' or ")', 'string'], true],
+ removeAttributeQuotes: [[false, 'Remove quotes around attributes when possible.']],
+ removeCDATASectionsFromCDATA: [[false, 'Remove CDATA sections from script and style elements']],
+ removeComments: [[false, 'Strip HTML comments']],
+ removeCommentsFromCDATA: [[false, 'Strip HTML comments from scripts and styles']],
removeEmptyAttributes: [[false, 'Remove all attributes with whitespace-only values']],
+ removeEmptyElements: [[false, 'Remove all elements with empty contents']],
+ removeOptionalTags: [[false, 'Remove unrequired tags']],
+ removeRedundantAttributes: [[false, 'Remove attributes when value matches default.']],
removeScriptTypeAttributes: [[false, 'Remove type="text/javascript" from script tags. Other type attribute values are left intact.']],
removeStyleLinkTypeAttributes: [[false, 'Remove type="text/css" from style and link tags. Other type attribute values are left intact.']],
- removeOptionalTags: [[false, 'Remove unrequired tags']],
- removeEmptyElements: [[false, 'Remove all elements with empty contents']],
- lint: [[false, 'Toggle linting']],
- keepClosingSlash: [[false, 'Keep the trailing slash on singleton elements']],
- caseSensitive: [[false, 'Treat attributes in case sensitive manner (useful for SVG; e.g. viewBox)']],
- minifyJS: [[false, 'Minify Javascript in script elements and on* attributes (uses UglifyJS)']],
- minifyCSS: [[false, 'Minify CSS in style elements and style attributes (uses clean-css)']],
- minifyURLs: [[false, 'Minify URLs in various attributes (uses relateurl)', 'string'], 'site-url'],
- ignoreCustomComments: [[false, 'Array of regex\'es that allow to ignore certain comments, when matched', 'string'], 'json-regex'],
- ignoreCustomFragments: [[false, 'Array of regex\'es that allow to ignore certain fragments, when matched (e.g. <?php ... ?>, {{ ... }})', 'string'], 'json-regex'],
- processScripts: [[false, 'Array of strings corresponding to types of script elements to process through minifier (e.g. "text/ng-template", "text/x-handlebars-template", etc.)', 'string'], 'json'],
- maxLineLength: [[false, 'Max line length', 'number'], true],
- customEventAttributes: [[false, 'Arrays of regex\'es that allow to support custom event attributes for minifyJS (e.g. ng-click)', 'string'], 'json-regex'],
- customAttrAssign: [[false, 'Arrays of regex\'es that allow to support custom attribute assign expressions (e.g. \'<div flex?="{{mode != cover}}"></div>\')', 'string'], 'json-regex'],
- customAttrSurround: [[false, 'Arrays of regex\'es that allow to support custom attribute surround expressions (e.g. <input {{#if value}}checked="checked"{{/if}}>)', 'string'], 'json-regex'],
- customAttrCollapse: [[false, 'Regex that specifies custom attribute to strip newlines from (e.g. /ng\-class/)', 'string'], 'string-regex']
+ removeTagWhitespace: [[false, 'Remove space between attributes whenever possible.']],
+ useShortDoctype: [[false, 'Replaces the doctype with the short (HTML5) doctype']]
};
var cliOptions = {