[Pkg-javascript-commits] [node-jade] 05/72: README: make API doc more readable

Jelmer Vernooij jelmer at moszumanska.debian.org
Sun Jul 3 18:03:24 UTC 2016


This is an automated email from the git hooks/post-receive script.

jelmer pushed a commit to annotated tag upstream/1.0.0
in repository node-jade.

commit f6895b44d269b566801b091d6acf38bb601500c8
Author: Timothy Gu <timothygu99 at gmail.com>
Date:   Wed Feb 11 16:58:50 2015 -0800

    README: make API doc more readable
---
 README.md | 36 ++++++++++++++++++++++++++++++++----
 1 file changed, 32 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index e495ad9..4eef8a8 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,12 @@ This gives the same API regardless of the jstransformer passed in.
 
 A transformer, once normalised using this module, will implement the following methods.  Note that if the underlying transformer cannot be used to implement the functionality, it may ultimately just throw an error.
 
-### `.render(str, options) => {body: String, dependencies: Array.<String>}`
+### `.render`
+
+```js
+transformer.render(str, options);
+=> {body: String, dependencies: Array.<String>}
+```
 
 _requires the underlying transform to implement `.render`_
 
@@ -36,7 +41,16 @@ Transform a string and return an object where:
  - `body` represents the result as a string
  - `dependencies` is an array of files that were read in as part of the render process (or an empty array if there were no dependencies)
 
-### `.renderAsync(str, options, callback)` / `.renderAsync(str, options) => Promise({body: String, dependencies: Array.<String>})`
+### `.renderAsync`
+
+```js
+transformer.renderAsync(str, options, callback);
+```
+
+```js
+transformer.renderAsync(str, options);
+=> Promise({body: String, dependencies: Array.<String>})
+```
 
 _requires the underlying transform to implement `.renderAsync` or `.render`_
 
@@ -47,7 +61,12 @@ Transform a string asynchronously and return an object where:
 
 If a callback is provided, it is called with the error followed by the result, otherwise a Promise is returned.
 
-### `.renderFile(filename, options) => {body: String, dependencies: Array.<String>}`
+### `.renderFile`
+
+```js
+transformer.renderFile(filename, options)
+=> {body: String, dependencies: Array.<String>}
+```
 
 _requires the underlying transform to implement `.renderFile` or `.render`_
 
@@ -56,7 +75,16 @@ Transform a file and return an object where:
  - `body` represents the result as a string
  - `dependencies` is an array of files that were read in as part of the render process (or an empty array if there were no dependencies).  This does not include the initial file being rendered.
 
-### `.renderFileAsync(filename, options, callback)` / `.renderFileAsync(filename, options) => Promise({body: String, dependencies: Array.<String>})`
+### `.renderFileAsync`
+
+```js
+transformer.renderFileAsync(filename, options, callback);
+```
+
+```js
+transformer.renderFileAsync(filename, options);
+=> Promise({body: String, dependencies: Array.<String>})
+```
 
 _requires the underlying transform to implement `.renderFileAsync`, `.renderFile`, `.renderAsync` or `.render`_
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-jade.git



More information about the Pkg-javascript-commits mailing list