- Notifications
You must be signed in to change notification settings - Fork191
Flexible and production-ready Mustache templates for MacOS Cocoa and iOS
License
groue/GRMustache
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
GRMustache is aMustache template engine written in Objective-C, for both MacOS Cocoa and iOS.
It ships with built-in goodies and extensibility hooks that let you avoid the strict minimalism of the genuine Mustache language when you need it.
April 22, 2015: GRMustache 7.3.2 is out.Release notes
Get release announcements and usage tips: follow@GRMustache on Twitter.
GRMustache targets iOS down to version 4.3, MacOS down to 10.6 Snow Leopard (without garbage collection), and only depends on the Foundation framework.
Swift developers: You can use GRMustache from Swift, with a limitation: you can only render Objective-C objects. Instead, consider usingGRMustache.swift, a pure Swift implementation of GRMustache.
You have three options, from the simplest to the hairiest:
#import"GRMustache.h"
One-liners:
// Renders "Hello Arthur!"NSString *rendering = [GRMustacheTemplaterenderObject:@{@"name":@"Arthur" }fromString:@"Hello {{name}}!"error:NULL];
// Renders the `Profile.mustache` resource of the main bundleNSString *rendering = [GRMustacheTemplaterenderObject:userfromResource:@"Profile"bundle:nilerror:NULL];
Reuse templates in order to avoid parsing the same template several times:
GRMustacheTemplate *template = [GRMustacheTemplatetemplateFromResource:@"Profile"bundle:nilerror:nil];rendering = [templaterenderObject:arthurerror:NULL];rendering = [templaterenderObject:barbaraerror:NULL];rendering = ...
If you don't know Mustache, start here:http://mustache.github.io/mustache.5.html
- Guides: a guided tour of GRMustache
- Reference: all classes & protocols
- Troubleshooting
- FAQ
Released under theMIT License.
- groue/GRMustache.swift: Flexible Mustache templates for Swift 1.2 and 2.
- groue/GRDB.swift: SQLite toolkit for Swift 2.
- groue/GRValidation: Validation toolkit for Swift 2.
About
Flexible and production-ready Mustache templates for MacOS Cocoa and iOS
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors14
Uh oh!
There was an error while loading.Please reload this page.