(formatter)
| 60 | }; |
| 61 | |
| 62 | function addCall(formatter) { |
| 63 | formatter.call = function(path,options,cb,errCb) { |
| 64 | try{ |
| 65 | formatter.compile(path,options,function(result) { |
| 66 | if (typeof result === 'string') { return cb(result); } |
| 67 | else { return errCb(result); } |
| 68 | },errCb); |
| 69 | } |
| 70 | catch(ex) { |
| 71 | return errCb(ex); |
| 72 | } |
| 73 | }; |
| 74 | } |
| 75 | }; |