An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# jstransformer-toffee

[Toffee](https://github.com/malgorithms/toffee) support for [JSTransformers](http://github.com/jstransformers).

[![Build Status](https://img.shields.io/travis/jstransformers/jstransformer-toffee/master.svg)](https://travis-ci.org/jstransformers/jstransformer-toffee)
[![Coverage Status](https://img.shields.io/codecov/c/github/jstransformers/jstransformer-toffee/master.svg)](https://codecov.io/gh/jstransformers/jstransformer-toffee)
[![Dependency Status](https://img.shields.io/david/jstransformers/jstransformer-toffee/master.svg)](http://david-dm.org/jstransformers/jstransformer-toffee)
[![NPM version](https://img.shields.io/npm/v/jstransformer-toffee.svg)](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