adding optional compress flag for rhino command line tool

This commit is contained in:
Jeff Tougas
2012-02-21 14:19:39 -05:00
parent ab5343098c
commit 9403777f82

View File

@@ -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);