Skip to content

Commit

Permalink
Adding concat files
Browse files Browse the repository at this point in the history
  • Loading branch information
alexferreira committed May 3, 2013
1 parent 88c3f6a commit bd980ce
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/util/fs-promised.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ var methods = [
'readFile',
'writeFile',
'mkdir',
'readdir'
'readdir',
'concat'
];

methods.forEach(function(method) {
Expand Down Expand Up @@ -41,3 +42,10 @@ exports.error = function(err) {
throw new Error(err);
};

exports.concat = function() {
var out = arguments[0].map(function(filePath){
filePath = './config/locales/'+filePath
return fs.readFileSync(filePath, 'utf-8');
});
return out.join('\n');
};

0 comments on commit bd980ce

Please sign in to comment.