https://github.com/jstransformers/jstransformer-toffee
toffee template engine for JS Transformers
https://github.com/jstransformers/jstransformer-toffee
Last synced: over 1 year ago
JSON representation
toffee template engine for JS Transformers
- Host: GitHub
- URL: https://github.com/jstransformers/jstransformer-toffee
- Owner: jstransformers
- License: mit
- Created: 2015-04-03T03:26:03.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2020-04-26T03:36:38.000Z (about 6 years ago)
- Last Synced: 2025-01-21T20:15:43.627Z (over 1 year ago)
- Language: JavaScript
- Size: 65.4 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE.md
Awesome Lists containing this project
README
# jstransformer-toffee
[Toffee](https://github.com/malgorithms/toffee) support for [JSTransformers](http://github.com/jstransformers).
[](https://travis-ci.org/jstransformers/jstransformer-toffee)
[](https://codecov.io/gh/jstransformers/jstransformer-toffee)
[](http://david-dm.org/jstransformers/jstransformer-toffee)
[](https://www.npmjs.org/package/jstransformer-toffee)
## Installation
npm install jstransformer-toffee
## API
```js
var toffee = require('jstransformer')(require('jstransformer-toffee'));
var opts = {};
toffee.render('
Hello #{place}!
', opts, {place: 'world'}).body;
//=> 'Hello world!
'
var promise = toffee.renderFileAsync('./path/to/hello.toffee', opts, {place: 'world'});
promise.then(function(data) {
console.log(data.body);
//=> '
Hello world!
'
});
```
## License
MIT