From b01666b99e039c1041cde0927f6c2958bcb2dd7f Mon Sep 17 00:00:00 2001 From: Jeff Escalante Date: Wed, 18 Dec 2013 18:49:38 -0500 Subject: [PATCH] small formatting bug in pretty list, green successful output --- bin/sprout | 2 +- lib/api/list.coffee | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/sprout b/bin/sprout index 289249e..e1c6f01 100755 --- a/bin/sprout +++ b/bin/sprout @@ -31,7 +31,7 @@ if (cmd.sync) { p = cmd({ template: argv._[0], path: argv._[1], options: opts_only(argv) }); break; } - p.done(console.log.bind(console), function(err){ + p.done(function(r){ console.log(r.green) }, function(err){ console.error("ERROR: ".red + err); process.exit(64); // command line usage error }); diff --git a/lib/api/list.coffee b/lib/api/list.coffee index efbab9f..92b81d3 100644 --- a/lib/api/list.coffee +++ b/lib/api/list.coffee @@ -13,11 +13,11 @@ class List extends Base if @pretty plist = "\n" plist += "Templates\n".bold.blue - plist += "---------\n\n".bold.blue + plist += "---------\n".bold.blue if list.length - plist += "- #{item}" for item in list + plist += "\n- #{item}" for item in list else - plist += 'no templates present' + plist += '\nno templates present' plist += "\n" return plist return list