Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/cmeiklejohn/rebar_js_handlebars_plugin

Rebar support for compilation of Handlebars files.
https://github.com/cmeiklejohn/rebar_js_handlebars_plugin

Last synced: about 2 months ago
JSON representation

Rebar support for compilation of Handlebars files.

Awesome Lists containing this project

README

        

# Rebar JS Handlebars Plugin

Handlebars support during rebar compilation.

## Installation

Specify ```rebar_js_handlebars_plugin``` as a dependency in your ```rebar.config```.

```erlang
{deps, [
{rebar_js_handlebars_plugin, ".*",
{git, "git://github.com/cmeiklejohn/rebar_js_handlebars_plugin.git", {branch, "master"}}}
]}.
```

Then, configure as a plugin in your ```rebar.config```.

```erlang
{plugins, [rebar_js_handlebars_plugin]}.
```

## Configuration

Example usage:

```erlang
{js_minispade, [
{doc_root, "priv/assets/javascripts"},
{out_dir, "priv/www/javascripts"},
{target, "Ember.TEMPLATES"},
{compiler, "Ember.Handlebars.compile"},
{templates, [{"templates", ["models"]}]}
]}.
```

Produces the following for each input, in one concatenated javascript file called templates.js.

```javascript
Ember.TEMPLATES['models'] = Ember.Handlebars.compile('

models

').
```