Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Commit

Permalink
Fixed documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
CliffS committed Sep 14, 2015
1 parent d61814b commit 736e8a5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ For a language-agnostic overview of mustache's template syntax, see the

## Usage

Mustache = require('mustache-file)
Mustache = require('mustache-file');

This returns a Mustache class that can be instantiated with `new`.

must = new Mustache(options)
must = new Mustache(options);

Create a new Mustache object. Options, currently are:
Create a new Mustache object. Options is an object containing:

extension:

The extension to add to the template names passed to `render`. If extension
The extension to add to the template names passed to `render()`. If extension
is null, nothing will be added to the filename. There is no need for
the leading `.` on the extension. The default is `mustache`.
the leading `.` on the extension. The default is `"mustache"`.

path:

Expand All @@ -46,14 +46,18 @@ be a string or an array of strings. If it is an array, the paths will be
searched in order, both for the original template and for each partial.
Relative paths are surched from the current working directory.

If it is not passed, templates will be loaded from the current working
directory.

### Example:

must = new Mustache({
extension: 'html',
path: [ 'templates/special', 'templates' ]
});

To render the template either pass a callback or treat `render()` as
To render the template either pass a callback or
(if no callback is passed) `render()` will return
a promise.

#### With a callback
Expand Down
2 changes: 1 addition & 1 deletion lib/mustache.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mustache-file",
"version": "0.1.5",
"version": "0.1.6",
"description": "Read mustache files and partials from disk and pass them to mustache",
"main": "lib/mustache.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/mustache.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# For fully documented souce code, please see the coffeescript
# source on Github.
#
# Version: 0.1.5
# Version: 0.1.6
#
###

Expand Down

0 comments on commit 736e8a5

Please sign in to comment.