creationix / wheat

Wheat is a blog engine for coders written in node.JS
Other
1.36k stars 134 forks source link

Implement 'process.stdout' in the sandbox. #16

Closed TooTallNate closed 13 years ago

TooTallNate commented 13 years ago

Hey Tim. I just thought you might want to merge this patch that adds process.stdout to the script sandbox in Wheat. The example scripts I am trying to run on my article are attempting to access process.stdout, which didn't exist!

I think this is a nice clean implementation that creates a "virtual" write stream that simply appends to snippet.output whenever it gets written to.

Note that this patch requires node v0.3, for use of the new Stream class, so you may want to wait until that is landed before merging.

creationix commented 13 years ago

Got it!