From a70753e6d38101a24e8a7fc5f5210b614b6e21a0 Mon Sep 17 00:00:00 2001 From: Trevor Burnham Date: Sun, 13 Nov 2011 15:13:05 -0500 Subject: [PATCH] Prefacing task list with the relative Cakefile path --- lib/coffee-script/cake.js | 4 +++- src/cake.coffee | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/coffee-script/cake.js b/lib/coffee-script/cake.js index e76fe7c8..60958528 100644 --- a/lib/coffee-script/cake.js +++ b/lib/coffee-script/cake.js @@ -65,7 +65,9 @@ }; printTasks = function() { - var desc, name, spaces, task; + var cakefilePath, desc, name, spaces, task; + cakefilePath = path.join(path.relative(__originalDirname, process.cwd()), 'Cakefile'); + console.log("" + cakefilePath + " defines the following tasks:\n"); for (name in tasks) { task = tasks[name]; spaces = 20 - name.length; diff --git a/src/cake.coffee b/src/cake.coffee index b4f02588..a3541907 100644 --- a/src/cake.coffee +++ b/src/cake.coffee @@ -58,6 +58,8 @@ exports.run = -> # Display the list of Cake tasks in a format similar to `rake -T` printTasks = -> + cakefilePath = path.join path.relative(__originalDirname, process.cwd()), 'Cakefile' + console.log "#{cakefilePath} defines the following tasks:\n" for name, task of tasks spaces = 20 - name.length spaces = if spaces > 0 then Array(spaces + 1).join(' ') else ''