https://github.com/mdp/hoganjs-brunch
A brunch compiler for Mustache template, using Hogan.js
https://github.com/mdp/hoganjs-brunch
Last synced: 12 months ago
JSON representation
A brunch compiler for Mustache template, using Hogan.js
- Host: GitHub
- URL: https://github.com/mdp/hoganjs-brunch
- Owner: mdp
- Created: 2012-02-21T19:55:07.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2017-10-26T20:19:35.000Z (over 8 years ago)
- Last Synced: 2025-03-24T20:43:00.703Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 9
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
- awesome-brunch - Mustache (Hogan)-brunch
README
# hoganjs-brunch
Adds [Hogan.js](http://twitter.github.com/hogan.js/) support to
[Brunch](http://brunch.io).
## Installation
```
npm install --save-dev hoganjs-brunch
```
Or add `"hoganjs-brunch": "x.y.z"` to `package.json` of your brunch app. Pick a plugin version that corresponds to your minor (y) Brunch version.
If you want to use git version of plugin, add
`"hoganjs-brunch": "git@github.com:mdp/hoganjs-brunch.git"`.
## Usage:
Create a Mustache template:
```
I live in {{name}}
```
Require the template:
```js
const template = require('views/templates/city');
```
Render the template with some data:
```js
document.body.innerHTML = template.render({'name': 'San Francisco'});
```