From 895b288bdfa4f8643a9cc25e8dc3ec217b3d0263 Mon Sep 17 00:00:00 2001 From: Richard van Velzen Date: Mon, 8 Feb 2016 10:36:28 +0100 Subject: [PATCH] Allow cli options to be specified in separate definitions Fix for #963. This allows stuff like `--define a=1 --define b=1` besides only `--define a=1,b=1` --- bin/uglifyjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/uglifyjs b/bin/uglifyjs index f7f22215..ff4cfedf 100755 --- a/bin/uglifyjs +++ b/bin/uglifyjs @@ -504,6 +504,8 @@ function getOptions(x, constants) { if (x == null) return null; var ret = {}; if (x !== "") { + if (Array.isArray(x)) x = x.map(function (v) { return "(" + v + ")"; }).join(", "); + var ast; try { ast = UglifyJS.parse(x, { expression: true });