Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 111 lines (62 sloc) 5.414 kb
a81f56a @groue Restore README title
authored
1 GRMustache
2 ==========
3
4 GRMustache is a production-ready implementation of [Mustache](http://mustache.github.com/) templates for MacOS Cocoa and iOS.
5
7929a5b @groue Release announcement in README.md
authored
6 **July 1st, 2012: GRMustache 4.1.1 is out.** [Release notes](GRMustache/blob/master/RELEASE_NOTES.md)
f01775d @groue README
authored
7
4f1625f @groue guides
authored
8 Breaking news on Twitter: http://twitter.com/GRMustache
070c126 @groue dot variable extension
authored
9
66a61ab @groue README
authored
10 How To
11 ------
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustacheD...
authored
12
559f600 @groue CocoaPods support
authored
13 ### 1. Download and add to your Xcode project
acb8902 @groue wording
authored
14
cf09386 @groue More straightforward README
authored
15 $ git clone https://github.com/groue/GRMustache.git
f5fb58f @groue wording
authored
16
6337526 @groue v4.0.0
authored
17 - For MacOS 10.6+ development, add `include/GRMustache.h` and `lib/libGRMustache4-MacOS.a` to your project.
18 - For iOS3+ development, add `include/GRMustache.h` and `lib/libGRMustache4-iOS.a` to your project.
b5c4640 @groue Expressiveness
authored
19
ef1f7e4 @groue Warn CocoaPods users against private headers
authored
20 Alternatively, you may use [CocoaPods](https://github.com/CocoaPods/CocoaPods): append `dependency 'GRMustache'` to your Podfile. In its current version, CocoaPods exposes private headers that you should not rely on, because future versions of GRMustache may change them, without notice, in an incompatible fashion. Make sure you only import `GRMustache.h`.
559f600 @groue CocoaPods support
authored
21
22 ### 2. Import "GRMustache.h" and start rendering templates
1f63119 @groue wording
authored
23
c3116bd @groue GitHub Flavored Markdown
authored
24 ```objc
25 #import "GRMustache.h"
26
27 // Renders "Hello Arthur!"
b15c302 @groue More straightforward README
authored
28 NSString *rendering = [GRMustacheTemplate renderObject:[Person personWithName:@"Arthur"]
29 fromString:@"Hello {{name}}!"
30 error:NULL];
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustacheD...
authored
31
66a61ab @groue README
authored
32 // Renders from a resource
33 NSString *rendering = [GRMustacheTemplate renderObject:[Person personWithName:@"Arthur"]
34 fromResource:@"Profile" // loads `Profile.mustache`
35 bundle:nil
36 error:NULL];
37 ```
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustacheD...
authored
38
559f600 @groue CocoaPods support
authored
39
634ad41 @groue wording
authored
40 Documentation
41 -------------
42
e8f9e1e @groue Reorganize documentation
authored
43 ### Mustache syntax
44
45 - http://mustache.github.com/mustache.5.html
46
47 ### Guides
cf09386 @groue More straightforward README
authored
48
2569690 @groue Wording
authored
49 - [Guides/templates.md](GRMustache/blob/master/Guides/templates.md): how to load, parse, and render templates from various sources
cf09386 @groue More straightforward README
authored
50 - [Guides/runtime.md](GRMustache/blob/master/Guides/runtime.md): how to provide data to templates
51 - [Guides/delegate.md](GRMustache/blob/master/Guides/delegate.md): how to hook into template rendering
e8f9e1e @groue Reorganize documentation
authored
52
53 ### Sample code
54
cf09386 @groue More straightforward README
authored
55 - [Guides/sample_code.md](GRMustache/blob/master/Guides/sample_code.md): because some tasks are easier to do with some guidelines.
9228835 @groue Common use cases right in the README
authored
56
e8f9e1e @groue Reorganize documentation
authored
57 ### Reference
58
59 - [Reference](http://groue.github.com/GRMustache/Reference/): The GRMustache reference, automatically generated from inline documentation, for fun and profit, by [appledoc](http://gentlebytes.com/appledoc/).
60
9228835 @groue Common use cases right in the README
authored
61
62 FAQ
63 ---
64
caedcda @groue Wording consistency
authored
65 - **Q: How do I render array indexes?**
9228835 @groue Common use cases right in the README
authored
66
da9cdeb @groue indexes.md guide
authored
67 A: Check [Guides/sample_code/indexes.md](GRMustache/blob/master/Guides/sample_code/indexes.md)
9228835 @groue Common use cases right in the README
authored
68
b483251 @groue Filters FAQ
authored
69 - **Q: How do I implement filters, format numbers, dates, etc?**
70
53c25e2 @groue Revert "Filters FAQ"
authored
71 A: Check documentation of [Mustache lambda sections](GRMustache/blob/master/Guides/runtime/helpers.md) first. If it would not help, maybe you'll get some inspiration from the [number formatting sample code](GRMustache/blob/master/Guides/sample_code/number_formatting.md). If you are still stuck after those, go and look for a [closed issue](GRMustache/issues?state=closed) that covers your need. Finally, open a new issue :-)
b483251 @groue Filters FAQ
authored
72
9228835 @groue Common use cases right in the README
authored
73 - **Q: How do I render default values for missing keys?**
74
75 A: This can be done by providing your template a delegate: check [Guides/delegate.md](GRMustache/blob/master/Guides/delegate.md).
76
4973f8c @groue README
authored
77 - **Q: I have a bunch of template partials that live in memory, not in the file system. How do I include them?**
c1bd462 @groue README
authored
78
1d73c2b @groue GRMustacheTemplateRepository guides
authored
79 A: Check [Guides/template_repositories.md](GRMustache/blob/master/Guides/template_repositories.md).
c1bd462 @groue README
authored
80
4973f8c @groue README
authored
81 - **Q: What is this NSUndefinedKeyException stuff?**
82
83 A: When GRMustache has to try several objects until it finds the one that provides a `{{key}}`, several NSUndefinedKeyException are raised and caught. Let us double guess you: it's likely that you wish Xcode would stop breaking on those exceptions. This use case is covered in [Guides/runtime/context_stack.md](GRMustache/blob/master/Guides/runtime/context_stack.md).
9228835 @groue Common use cases right in the README
authored
84
85
86 Contribution wish-list
87 ----------------------
88
89 I wish somebody would review my non-native English, and clean up the guides, if you ask.
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustacheD...
authored
90
f5fb58f @groue wording
authored
91
c0e699e @groue wip
authored
92 Forking
93 -------
94
d8957ab @groue renamed guides to Guides
authored
95 Please fork. You'll learn useful information in [Guides/forking.md](GRMustache/blob/master/Guides/forking.md).
c0e699e @groue wip
authored
96
f5fb58f @groue wording
authored
97
e4bd74e @groue License
authored
98 License
99 -------
100
101 Released under the [MIT License](http://en.wikipedia.org/wiki/MIT_License)
102
4f1625f @groue guides
authored
103 Copyright (c) 2012 Gwendal Roué
e4bd74e @groue License
authored
104
105 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:
106
107 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
108
109 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.
110
Something went wrong with that request. Please try again.