From d2f8a539a4cd165d24b5aa86c84b2337d93ea6ef Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Tue, 18 Jan 2011 14:31:04 -0500 Subject: [PATCH] Add -d argument to css testing --- bin/messc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bin/messc b/bin/messc index 01c4b00..dacf827 100755 --- a/bin/messc +++ b/bin/messc @@ -31,6 +31,8 @@ args = args.filter(function (arg) { break; case 'j': options.json = true; + case 'd': + options.debug = true; case 's': case 'silent': options.silent = true; @@ -95,6 +97,13 @@ fs.readFile(input, 'utf-8', function (e, data) { process.exit(1); } else { try { + if (options.debug) { + try { + require('eyes').inspect(tree.toAST()); + } catch (e) { + console.log(tree.toAST()); + } + } css = tree.toCSS({ compress: options.compress }); sys.print(css); } catch (e) {