Skip to content

Instantly share code, notes, and snippets.

@piscisaureus piscisaureus/bla.js
Created Oct 1, 2013

Embed
What would you like to do?
task.create(function ConcatTwoFilesAndThenSomeTask() {
fs.readFile('some/template', 'utf8', function(err, file1) {
if (err) throw err;
fs.readFile('something/else', 'utf8', function(err, file2) {
if (err) throw err;
var data = file1 + '--' + file2;
data = data.replace(/foo/g, 'bar');
return data;
});
});
}).setCallback(function(err, result) {
if (err)
throw err;
// Do something with the result.
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.