https://github.com/jstransformers/jstransformer-handlebars
Handlebars support for JS Transformers.
https://github.com/jstransformers/jstransformer-handlebars
Last synced: 11 months ago
JSON representation
Handlebars support for JS Transformers.
- Host: GitHub
- URL: https://github.com/jstransformers/jstransformer-handlebars
- Owner: jstransformers
- License: mit
- Created: 2015-02-09T12:30:35.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-08-03T20:42:00.000Z (almost 3 years ago)
- Last Synced: 2025-01-31T20:52:06.263Z (over 1 year ago)
- Language: JavaScript
- Homepage: http://npmjs.com/jstransformer-handlebars
- Size: 305 KB
- Stars: 6
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE.md
Awesome Lists containing this project
README
# jstransformer-handlebars
[Handlebars.js](http://handlebarsjs.com/) support for [JSTransformers](http://github.com/jstransformers).
[![Build Status][ci-badge]][ci-url]
[](https://codecov.io/gh/jstransformers/jstransformer-handlebars)
[](https://www.npmjs.org/package/jstransformer-handlebars)
## Installation
npm install jstransformer-handlebars
## API
```js
var handlebars = require('jstransformer')(require('jstransformer-handlebars'));
var locals = {
name: "World"
};
handlebars.render('
Hello {{name}}!
', {}, locals).body
//=> 'Hello World!
'
```
In addition to the standard [Handlebars compile options](https://handlebarsjs.com/api-reference/compilation.html#handlebars-compile-template-options), the render method can be passed objects for `partials`, `helpers` and `decorators` (deprecated).
## License
MIT
[ci-badge]: https://github.com/jstransformers/jstransformer-handlebars/actions/workflows/test.yml/badge.svg
[ci-url]: https://github.com/jstransformers/jstransformer-handlebars/actions/workflows/test.yml