Skip to content

Commit

Permalink
added: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
emaphp committed Oct 20, 2014
1 parent cb462db commit c2aa5a9
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,58 @@ handlebars-template-loader
==========================

A Handlebars template loader for Webpack

<br/>
###Usage

<br/>
**Installation**
```bash
$ npm install handlebars-template-loader
```

<br/>
**Add loader**
```javascript
module.exports = {
//...
loaders: [
//...
{ test: /\.hbs/, loader: "handlebars-template-loader" }
]
};
```

<br/>
**Loading templates**

```html
<!-- file: hello.hbs -->
<p>Hello&nbsp;{{name}}</p>
```

```javascript
//file: app.js
var compiled = require('./hello.hbs');
return compiled({name: "world"});
```

<br/>
**Include tag**


```html
<!-- file: main.hbs -->
<p>Hello, <!--include message.hbs--></p>
```


```html
<!-- file: message.hbs -->
<em>how are you?</em>
```

<br/>
###License

Released under the MIT license.

0 comments on commit c2aa5a9

Please sign in to comment.