Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated

  • Loading branch information...
commit 4843d9cda2425a7c1c729a71b8fe26b04e726090 1 parent 5c715dc
@defunkt defunkt authored
Showing with 35 additions and 1 deletion.
  1. +35 −1 mustache.1.html
View
36 mustache.1.html
@@ -67,7 +67,10 @@ <h2 id='NAME'>NAME</h2>
<h2>SYNOPSIS</h2>
-<p><code>cat data.yml template.mustache | mustache</code></p>
+<pre><code>mustache &lt;YAML> &lt;FILE>
+mustache --compile &lt;FILE>
+mustache --tokens &lt;FILE>
+</code></pre>
<h2>DESCRIPTION</h2>
@@ -140,6 +143,24 @@ <h2 id='NAME'>NAME</h2>
Hi scott!
</code></pre>
+<h2>OPTIONS</h2>
+
+<p>By default <code>mustache</code> will try to render a Mustache template using the
+YAML frontmatter you provide. It can do a few other things, however.</p>
+
+<dl>
+<dt><code>-c</code>, <code>--compile</code></dt><dd><p>Print the compiled Ruby version of a given template. This is the
+code that is actually used when rendering a template into a
+string. Useful for debugging but only if you are familiar with
+Mustache's internals.</p></dd>
+<dt><code>-t</code>, <code>--tokens</code></dt><dd><p>Print the tokenized form of a given Mustache template. This can be
+used to understand how Mustache parses a template. The tokens are
+handed to a generator which compiles them into a Ruby
+string. Syntax errors and confused tags, therefor, can probably be
+identified by examining the tokens produced.</p></dd>
+</dl>
+
+
<h2>INSTALLATION</h2>
<p>If you have RubyGems installed:</p>
@@ -147,6 +168,19 @@ <h2 id='NAME'>NAME</h2>
<pre><code>gem install mustache
</code></pre>
+<h2>EXAMPLES</h2>
+
+<pre><code>$ mustache data.yml template.mustache
+$ cat data.yml | mustache - template.mustache
+$ mustache -c template.mustache
+$ cat &lt;&lt;data | ruby mustache - template.mustache
+---
+name: Bob
+age: 30
+---
+data
+</code></pre>
+
<h2>COPYRIGHT</h2>
<p>Mustache is Copyright (C) 2009 Chris Wanstrath</p>
Please sign in to comment.
Something went wrong with that request. Please try again.