Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 98 lines (55 sloc) 3.885 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
b4dfe0d @groue v5.0.1
authored
6 **September 15th, 2012: GRMustache 5.0.1 is out.** [Release notes](GRMustache/blob/master/RELEASE_NOTES.md)
f01775d @groue README
authored
7
9286ccb @groue link to iPhone5 branch
authored
8 **iPhone5 development**: use the [iPhone5 branch](https://github.com/groue/GRMustache/tree/iPhone5). It includes the armv7s slice.
9
4f1625f @groue guides
authored
10 Breaking news on Twitter: http://twitter.com/GRMustache
070c126 @groue dot variable extension
authored
11
66a61ab @groue README
authored
12 How To
13 ------
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustacheD...
authored
14
559f600 @groue CocoaPods support
authored
15 ### 1. Download and add to your Xcode project
acb8902 @groue wording
authored
16
cf09386 @groue More straightforward README
authored
17 $ git clone https://github.com/groue/GRMustache.git
f5fb58f @groue wording
authored
18
9797639 @groue v5.0.0
authored
19 - For MacOS development, add `include/GRMustache.h` and `lib/libGRMustache5-MacOS.a` to your project.
20 - For iOS development, add `include/GRMustache.h` and `lib/libGRMustache5-iOS.a` to your project.
498f196 @groue Attempt to clarify the targeted system versions
authored
21
9797639 @groue v5.0.0
authored
22 Alternatively, you may use [CocoaPods](https://github.com/CocoaPods/CocoaPods): append `pod 'GRMustache', '~> 5.0'` to your Podfile.
b5c4640 @groue Expressiveness
authored
23
7924382 @groue v5.0.0
authored
24 GRMustache targets MacOS down to 10.6 Snow Leopard, iOS down to version 4, and only depends on the Foundation framework.
559f600 @groue CocoaPods support
authored
25
d8d27c1 @groue README.md tweaks
authored
26 ### 2. Start rendering templates
1f63119 @groue wording
authored
27
c3116bd @groue GitHub Flavored Markdown
authored
28 ```objc
29 #import "GRMustache.h"
30
31 // Renders "Hello Arthur!"
b15c302 @groue More straightforward README
authored
32 NSString *rendering = [GRMustacheTemplate renderObject:[Person personWithName:@"Arthur"]
33 fromString:@"Hello {{name}}!"
34 error:NULL];
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustacheD...
authored
35
d8d27c1 @groue README.md tweaks
authored
36 // Renders a document from the `Profile.mustache` resource
66a61ab @groue README
authored
37 NSString *rendering = [GRMustacheTemplate renderObject:[Person personWithName:@"Arthur"]
d8d27c1 @groue README.md tweaks
authored
38 fromResource:@"Profile"
66a61ab @groue README
authored
39 bundle:nil
40 error:NULL];
41 ```
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustacheD...
authored
42
559f600 @groue CocoaPods support
authored
43
634ad41 @groue wording
authored
44 Documentation
45 -------------
46
d67b4cc @groue Guides/helpers.md refactoring + Insert Guides/localization.md in the doc...
authored
47 Documentation starts here: [Guides/introduction.md](GRMustache/blob/master/Guides/introduction.md).
e8f9e1e @groue Reorganize documentation
authored
48
9228835 @groue Common use cases right in the README
authored
49
50 FAQ
51 ---
52
caedcda @groue Wording consistency
authored
53 - **Q: How do I render array indexes?**
9228835 @groue Common use cases right in the README
authored
54
da9cdeb @groue indexes.md guide
authored
55 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
56
d67b4cc @groue Guides/helpers.md refactoring + Insert Guides/localization.md in the doc...
authored
57 - **Q: How do I format numbers and dates?**
b483251 @groue Filters FAQ
authored
58
d67b4cc @groue Guides/helpers.md refactoring + Insert Guides/localization.md in the doc...
authored
59 A: Check [Guides/sample_code/number_formatting.md](GRMustache/blob/master/Guides/sample_code/number_formatting.md)
60
61 - **Q: How do I localize templates?**
62
63 A: Check [Guides/sample_code/localization.md](GRMustache/blob/master/Guides/sample_code/localization.md)
b483251 @groue Filters FAQ
authored
64
9228835 @groue Common use cases right in the README
authored
65 - **Q: How do I render default values for missing keys?**
66
d8d27c1 @groue README.md tweaks
authored
67 A: Check [Guides/delegate.md](GRMustache/blob/master/Guides/delegate.md).
9228835 @groue Common use cases right in the README
authored
68
d8d27c1 @groue README.md tweaks
authored
69 - **Q: Does GRMustache provide any layout facility?**
c1bd462 @groue README
authored
70
d8d27c1 @groue README.md tweaks
authored
71 A: No. But there is a [sample Xcode project](GRMustache/tree/master/Guides/sample_code/layout) that demonstrates how to do that.
c1bd462 @groue README
authored
72
4973f8c @groue README
authored
73 - **Q: What is this NSUndefinedKeyException stuff?**
74
75 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
76
9f3dcaf @groue Answer to FAQ: "Why does GRMustache need JRSwizzle?"
authored
77 - **Q: Why does GRMustache need JRSwizzle?**
78
d8d27c1 @groue README.md tweaks
authored
79 A: GRMustache does not need it. However, *you* may happy having GRMustache [swizzle](http://www.mikeash.com/pyblog/friday-qa-2010-01-29-method-replacement-for-fun-and-profit.html) `valueForUndefinedKey:` in the NSObject and NSManagedObject classes when you invoke `[GRMustache preventNSUndefinedKeyExceptionAttack]`. The use case is described in [Guides/runtime/context_stack.md](GRMustache/blob/master/Guides/runtime/context_stack.md).
9f3dcaf @groue Answer to FAQ: "Why does GRMustache need JRSwizzle?"
authored
80
9228835 @groue Common use cases right in the README
authored
81
82 Contribution wish-list
83 ----------------------
84
85 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
86
f5fb58f @groue wording
authored
87
c0e699e @groue wip
authored
88 Forking
89 -------
90
d8957ab @groue renamed guides to Guides
authored
91 Please fork. You'll learn useful information in [Guides/forking.md](GRMustache/blob/master/Guides/forking.md).
c0e699e @groue wip
authored
92
f5fb58f @groue wording
authored
93
e4bd74e @groue License
authored
94 License
95 -------
96
c2029a5 @groue LICENSE file
authored
97 Released under the [MIT License](GRMustache/blob/master/LICENSE).
Something went wrong with that request. Please try again.