Cake task and invoke callbacks? #2404

leeola opened this Issue Jun 27, 2012 · 2 comments


None yet

3 participants


So, let me preface this all with the fact that i understand Cake is very minimal. I understand it's intention is just to expose a very simplistic way to set up your own code execution, and for most things; if you want it, build it.

So with that said, i still think task and invoke calls should have optional callbacks.

My reason for this is simply that the description on of invoke is "for example, running build before test, you can use the invoke function: invoke 'build'". Now, to me this statement is rather untrue. Currently building basically any amount of coffee script is done by calling bin/coffee as a process. Your only other option is to roll your own nodejs fs read/write setup. This is not a problem per se, but all of this means that any amount of coffeescript compiling will be done asynchronously.. and there for invoke becomes basically useless. Please, correct me if i am wrong.

So while it is trivial to reimplement your own versions of task/invoke in the Cakefile to support proper callbacks and asynchronous code, it seems silly to me. It seems like Cakefile should support asynchronous code, since so much of the existing NodeJS Coffee Script implementation requires asynchronous code.

So, thoughts?

TL;DR Cakefile should support asnychronous code, since bin/coffee utterly depends on spawn (and in turn, asynchronous code).


I am in complete agreement. See the CoffeeScriptRedux Cakefile, in particular the build:full task. +1.

@dougbeal dougbeal added a commit to dougbeal/coffee-script that referenced this issue Jan 17, 2014
@dougbeal dougbeal jashkenas#2404
The commit seems to be orphaned or something, reproduce it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment