<commit_before># Haml for JavaScript templates with the asset pipeline

Writing JavaScript templates for Backbone.js (or other frameworks) in your app?
Would you like to use `haml` in the asset pipeline?

This gem adds `haml` support to the Rails 3.1+ asset pipeline. You will also
need a gem that creates a compiled JavaScript template like `hogan_assets` or
`handlebars_assets` as well.

## Installing

Add this to your `Gemfile`

    gem 'haml_assets'

### Upgrading from 0.0.x

`haml_assets` now works with the `haml` gem. Please update your gemfile to only
require `haml_assets.`.

## Writing your JavaScript templates

## Templates directory

You should located your templates under `app/assets`; we suggest
`app/assets/templates`. In your JavaScript manifest file (for example
`application.js`), use `require_tree`

    //= require_tree ../templates

### The template file

Inside your templates directory, add your template file. The file should be<commit_msg>Tiny tweak<commit_after># Haml for JavaScript templates with the asset pipeline

Writing JavaScript templates for Backbone.js (or other frameworks) in your app?
Would you like to use `haml` in the asset pipeline?

This gem adds `haml` support to the Rails 3.1+ asset pipeline. You will also
need a gem that creates a compiled JavaScript template like `hogan_assets` or
`handlebars_assets` as well.

## Installing

Add this to your `Gemfile`

    gem 'haml_assets'

### Upgrading from 0.0.x

`haml_assets` now works with the `haml` gem. Please update your gemfile to only
require `haml_assets.`.

## Writing your JavaScript templates

### Templates directory

You should located your templates under `app/assets`; we suggest
`app/assets/templates`. In your JavaScript manifest file (for example
`application.js`), use `require_tree`

    //= require_tree ../templates

### The template file

Inside your templates directory, add your template file. The file should be
{'fraction_non_alphanumeric': 0.07600827300930714, 'fraction_numerical': 0.004136504653567736, 'mean_word_length': 4.5285714285714285, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7069466', 'n_tokens_mistral': 548, 'n_tokens_neox': 528, 'n_words': 256}