Prefacing task list with the relative Cakefile path

This commit is contained in:
Trevor Burnham 2011-11-13 15:13:05 -05:00
parent 97dbb7bb49
commit a70753e6d3
2 changed files with 5 additions and 1 deletions

View File

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

View File

@ -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 ''