Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 80 lines (45 sloc) 4.222 kB
f01775d @groue README
authored
1 GRMustache
2 ==========
3
acb8902 @groue wording
authored
4 GRMustache is an Objective-C implementation of the [Mustache](http://mustache.github.com/) logic-less template engine.
f01775d @groue README
authored
5
4f1625f @groue guides
authored
6 The Mustache syntax: http://mustache.github.com/mustache.5.html (not wrong, but somewhat outdated).
f01775d @groue README
authored
7
4f1625f @groue guides
authored
8 A list of Mustache implementations in other languages: http://mustache.github.com/
f01775d @groue README
authored
9
4f1625f @groue guides
authored
10 Breaking news on Twitter: http://twitter.com/GRMustache
070c126 @groue dot variable extension
authored
11
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustac…
authored
12
4f1625f @groue guides
authored
13 What you get
14 ------------
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustac…
authored
15
acb8902 @groue wording
authored
16 **MacOS 10.6+, iPhoneOS 3.0, iOS 4.0+ support**
17
f5fb58f @groue wording
authored
18 **An ARC-compatible static library**, that will run on your computers, devices, simulators.
19
362901f @groue Remove reference to Handlebars.js. Actually our support is far too li…
authored
20 **Compatibility with other Mustache implementations**: [Mustache specification v1.1.2](https://github.com/mustache/spec) conformance.
4f1625f @groue guides
authored
21
f5fb58f @groue wording
authored
22 **Compatibility with previous GRMustache versions**: update GRMustache, enjoy [performance improvements](https://github.com/groue/GRMustacheBenchmark) and bugfixes, and don't change a line of your code. You may get harmless deprecation warnings, though. Check the [release notes](GRMustache/blob/master/RELEASE_NOTES.md).
945eb6d @groue more README
authored
23
b5c4640 @groue Expressiveness
authored
24 **Expressiveness**: GRMustache lets you break out of Mustache limits, in conscience, when you need.
25
18da0ef @groue Number formatting sample code
authored
26 **Documentation**: GRMustache online documentation is provided as guides and sample code:
9f476dc @groue direct links to guides
authored
27
28 - [guides/embedding.md](GRMustache/blob/master/guides/embedding.md): how to embed GRMustache in your Xcode projects
29 - [guides/templates.md](GRMustache/blob/master/guides/templates.md): how to parse and render templates
30 - [guides/runtime.md](GRMustache/blob/master/guides/runtime.md): how to provide data to templates
79d2814 @groue GRMustacheTemplateDelegate documentation
authored
31 - [guides/delegate.md](GRMustache/blob/master/guides/delegate.md): how to hook into template rendering
18da0ef @groue Number formatting sample code
authored
32 - [guides/sample_code.md](GRMustache/blob/master/guides/sample_code.md): because some tasks are easier to do with some guidelines.
9f476dc @groue direct links to guides
authored
33 - [guides/forking.md](GRMustache/blob/master/guides/forking.md): how GRMustache is organized
18dc85c @groue v1.8.0
authored
34
4f1625f @groue guides
authored
35 Usage
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustac…
authored
36 -----
37
4f1625f @groue guides
authored
38 GRMustache rendering is the combination of a template string and of an object that will provide the data.
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustac…
authored
39
1f63119 @groue wording
authored
40 You can render templates on the fly:
41
4f1625f @groue guides
authored
42 #import "GRMustache.h"
43
44 NSString *templateString = @"Hello {{name}}!";
45 Person *arthur = [Person personWithName:@"Arthur"];
46
f5fb58f @groue wording
authored
47 // Renders "Hello Arthur!"
7cbddec @groue wording
authored
48 NSString *rendering = [GRMustacheTemplate renderObject:arthur fromString:templateString error:NULL];
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustac…
authored
49
1f63119 @groue wording
authored
50 You can also parse a template once, and render it many times.
51
92c07e2 @groue v1.11.0
authored
52 GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:templateString error:NULL];
7cbddec @groue wording
authored
53 rendering = [template renderObject:arthur];
54 rendering = [template renderObject:...];
1f63119 @groue wording
authored
55
56 Speaking of templates, GRMustache eats many kinds of them: files and bundle resources as well as raw strings. For more information, check [guides/templates.md](GRMustache/blob/master/guides/templates.md).
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustac…
authored
57
90b8751 @groue guide links get crazy
authored
58 Regarding the data objects, GRMustache fetches values with the standard Key-Value Coding `valueForKey:` method. Check [guides/runtime.md](GRMustache/blob/master/guides/runtime.md).
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustac…
authored
59
f5fb58f @groue wording
authored
60
c0e699e @groue wip
authored
61 Forking
62 -------
63
90b8751 @groue guide links get crazy
authored
64 Please fork. You'll learn useful information in [guides/forking.md](GRMustache/blob/master/guides/forking.md).
c0e699e @groue wip
authored
65
f5fb58f @groue wording
authored
66
e4bd74e @groue License
authored
67 License
68 -------
69
70 Released under the [MIT License](http://en.wikipedia.org/wiki/MIT_License)
71
4f1625f @groue guides
authored
72 Copyright (c) 2012 Gwendal Roué
e4bd74e @groue License
authored
73
74 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
75
76 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
77
78 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
79
Something went wrong with that request. Please try again.