From 479c6574c93afce7a3a8e6dd2a4c9644eecce354 Mon Sep 17 00:00:00 2001 From: alexlamsl Date: Wed, 23 Mar 2016 22:26:29 +0800 Subject: [PATCH] update options --- cli.js | 54 +++++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/cli.js b/cli.js index 0e739e8..62cfce5 100755 --- a/cli.js +++ b/cli.js @@ -55,38 +55,42 @@ usage += ' on the command line you must escape those such as --ignore-custom- 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. \'
\')', '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. )', '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. , {{ ... }})', '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. , {{ ... }})', '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. \'
\')', 'string'], 'json-regex'], - customAttrSurround: [[false, 'Arrays of regex\'es that allow to support custom attribute surround expressions (e.g. )', '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 = { -- 2.34.1