From c2aa5a998c040fd32eb0d0991a034bfbd9bb5a68 Mon Sep 17 00:00:00 2001 From: emaphp Date: Mon, 20 Oct 2014 14:42:21 -0300 Subject: [PATCH] added: docs --- README.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/README.md b/README.md index 4dfc7b2..df90f2b 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,58 @@ handlebars-template-loader ========================== A Handlebars template loader for Webpack + +
+###Usage + +
+**Installation** +```bash +$ npm install handlebars-template-loader +``` + +
+**Add loader** +```javascript +module.exports = { + //... + loaders: [ + //... + { test: /\.hbs/, loader: "handlebars-template-loader" } + ] +}; +``` + +
+**Loading templates** + +```html + +

Hello {{name}}

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

Hello,

+``` + + +```html + +how are you? +``` + +
+###License + +Released under the MIT license. \ No newline at end of file