Closed tkellen closed 11 years ago
what is buffer exactly? can it be like anything?
@cowboy pointed out that it might be useful to make tasks only aware of buffers, and to perform reading/writing operations separately. I'm not sure what that looks like yet, but I can see the utility in like, piggybacking off the copy task to write to S3 or something.
Actually, nevermind. Grunt's file-expansion utilities cover that need. Yeah, I'm not clear what the utility is in having tasks that need other tasks to complete their read/write operations.
I don’t like “filterRead” name. How about “map”? It’s consistent with array method that does transformation from input to output.
[file1, file2, file3].map(function(file) {
file.data = coffeescript.compile(file.data);
return file;
});
Thanks for the feedback Paul, that makes complete sense. I think perhaps this discussion should be tabled for now, though (in light of issue #12)
I've just published a rough cut of the reader specification for node-task. Please ignore the mess that is logging for now. I'd love some feedback.
It's probably premature to get into this, but I just want to say that the writer version of the spec will basically dictate that the run method should resolve it's promise with a "bufferized" input object (see the reader spec for what that means). Task runners can then pipe those through other tasks until they are eventually finalized.
/cc @cowboy, @sindresorhus, @paulmillr, @millermedeiros, @marcooliveira, @satazor