mirror of
https://github.com/less/less.js.git
synced 2026-02-06 04:55:03 -05:00
adding optional compress flag for rhino command line tool
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user