https://github.com/jstransformers/jstransformer-hamlet
Hamlet support for JSTransformers
https://github.com/jstransformers/jstransformer-hamlet
Last synced: about 2 months ago
JSON representation
Hamlet support for JSTransformers
- Host: GitHub
- URL: https://github.com/jstransformers/jstransformer-hamlet
- Owner: jstransformers
- License: mit
- Created: 2015-08-06T23:21:20.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2020-04-26T02:40:44.000Z (about 6 years ago)
- Last Synced: 2026-01-01T21:51:10.253Z (6 months ago)
- Language: JavaScript
- Size: 53.7 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE.md
Awesome Lists containing this project
README
# jstransformer-hamlet
[Hamlet](https://github.com/gregwebs/hamlet.js) support for [JSTransformers](http://github.com/jstransformers).
[](https://travis-ci.org/jstransformers/jstransformer-hamlet)
[](https://codecov.io/gh/jstransformers/jstransformer-hamlet)
[](http://david-dm.org/jstransformers/jstransformer-hamlet)
[](https://www.npmjs.org/package/jstransformer-hamlet)
## Installation
npm install jstransformer-hamlet
## API
```js
var hamlet = require('jstransformer')(require('jstransformer-hamlet'));
var template = '
\n Hi, #{hamlet}!';
var locals = {hamlet: 'world'};
hamlet.compile(template).fn(locals);
//=> '
Hi, world!'
hamlet.render(template, locals).body;
//=> '
Hi, world!'
```
## License
MIT