From 9403777f82d8e8c75a1a181db209cc27ad8d9c47 Mon Sep 17 00:00:00 2001 From: Jeff Tougas Date: Tue, 21 Feb 2012 14:19:39 -0500 Subject: [PATCH] adding optional compress flag for rhino command line tool --- lib/less/rhino.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/less/rhino.js b/lib/less/rhino.js index a2c5662f..20d0aa5d 100644 --- a/lib/less/rhino.js +++ b/lib/less/rhino.js @@ -27,7 +27,8 @@ function writeFile(filename, content) { // Command line integration via Rhino (function (args) { name = args[0]; - var output = args[1]; + var output = args[1], + compress = args[2]; if (!name) { print('No files present in the fileset; Check your pattern match in build.xml'); @@ -48,7 +49,7 @@ function writeFile(filename, content) { if (e) { quit(1); } else { - result = root.toCSS(); + result = root.toCSS({compress: compress || false}); if (output) { writeFile(output, result); print("Written to " + output);