# grunt-commonjs-handlebars

> Precompile Handlebars templates into commonjs modules.

Latest version **0.1.0rc7** (published 2013-01-29) · 0 weekly downloads

## Install

```sh
npm install grunt-commonjs-handlebars
pnpm add grunt-commonjs-handlebars
yarn add grunt-commonjs-handlebars
bun add grunt-commonjs-handlebars
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0rc7 |
| Published | 2013-01-29 |
| First published | 2013-01-29 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+9 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Chris Abrams |
| Maintainers | chrisabrams |
| Keywords | gruntplugin |

## Links

- npm: https://www.npmjs.com/package/grunt-commonjs-handlebars
- Repository: https://github.com/avos/grunt-commonjs-handlebars
- Issues: https://github.com/avos/grunt-commonjs-handlebars/issues
- npm.io page: https://npm.io/package/grunt-commonjs-handlebars

## Dependencies (2)

- [handlebars](https://npm.io/package/handlebars.md) ~1.0.8
- [grunt-lib-contrib](https://npm.io/package/grunt-lib-contrib.md) ~0.5.1

## Recent versions

- 0.1.0rc7 (latest) — 2013-01-29

## README

# grunt-commonjs-handlebars [![Build Status](https://secure.travis-ci.org/avos/grunt-commonjs-handlebars.png?branch=master)](http://travis-ci.org/avos/grunt-contrib-handlebars)

> Precompile Handlebars templates into commonjs modules.

## Getting Started
If you haven't used [grunt][] before, be sure to check out the [Getting Started][] guide, as it explains how to create a [gruntfile][Getting Started] as well as install and use grunt plugins. Once you're familiar with that process, install this plugin with this command:

```shell
npm install grunt-commonjs-handlebars --save-dev
```
[grunt]: http://gruntjs.com/
[Getting Started]: https://github.com/gruntjs/grunt/blob/devel/docs/getting_started.md

## Handlebars task
_Run this task with the `grunt handlebars` command._

_This task is a [multi task][] so any targets, files and options should be specified according to the [multi task][] documentation._
[multi task]: https://github.com/gruntjs/grunt/wiki/Configuring-tasks

### Usage Examples

```js
handlebars: {
  dist: {
    files: {
      "path/to/result.js": "path/to/source.hbs",
      "path/to/another.js": ["path/to/sources/*.hbs", "path/to/more/*.hbs"]
    }
  },

  //This is an example to convert each .hbs into its own .js file.
  dev: {
    files: grunt.file.expandMapping(['app/views/templates/**/*.hbs'], 'tmp/views/templates/', {
      rename: (destBase, destPath) ->
        return destBase + destPath.split('app/views/templates/')[1].replace /\.hbs$/, '.js'
    })
  }
}
```

## Release History

 * 2013-01-22   v0.1.0rc7   Initial release.

## License
Copyright (c) 2012 Team Delicious, AVOS Systems Inc., Tim Branyen, contributors
Licensed under the MIT license.

---
_Source: https://npm.io/package/grunt-commonjs-handlebars · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
