1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

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