Permalink
Browse files

Updated documentation to match up with latest node API

  • Loading branch information...
1 parent df91e3f commit 44f2582b99bb217a3967d153a6061a11d04f7107 Luu-Danh, Hieu committed Sep 10, 2011
Showing with 6 additions and 5 deletions.
  1. +6 −5 README.md
View
@@ -76,13 +76,14 @@ Within your application, you can use parrot like the following:
Where the input variable is a string you would like parrot to render. If you would like to render a file, do the following:
- var parrot = require('./lib/parrot'),
- fs = require('fs');
-
- fs.readFile(file, function(data) {
-
+ ```javascript
+ var parrot = require('./lib/parrot');
+ var fs = require('fs');
+ fs.readFile(file, encoding, function(err, data) {
+ if (err) throw err;
var output = parrot.render(data);
});
+ ```
Where file is a string value of the file you wish to render, and output is the rendered template.

0 comments on commit 44f2582

Please sign in to comment.