From 8930858cd97ef4e76fde46f334dfb8cdc75c4f33 Mon Sep 17 00:00:00 2001 From: alexlamsl Date: Sun, 7 Feb 2016 16:29:16 +0800 Subject: [PATCH] fix minifyURLs in command-line usage since it is defined as a boolean parameter, this option never worked --- cli.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cli.js b/cli.js index 2c18e90..fad4062 100755 --- a/cli.js +++ b/cli.js @@ -80,7 +80,7 @@ var mainOptions = { 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)']], + 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'], @@ -274,6 +274,9 @@ cli.main(function(args, options) { case 'string-regex': minifyOptions[key] = stringToRegExp(value); break; + case 'site-url': + minifyOptions[key] = { site: value }; + break; case true: minifyOptions[key] = value; break; -- 2.34.1