Created
October 1, 2013 18:59
-
-
Save piscisaureus/6783332 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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