@jaredwray/fumanchu 1.0.3 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,6 +13,7 @@ Handlebars + Helpers Together
|
|
|
13
13
|
|
|
14
14
|
## Table of Contents
|
|
15
15
|
* [Using in Nodejs](#using-in-nodejs)
|
|
16
|
+
* [Just using Handlebar Helpers](#using-handlebars-helpers)
|
|
16
17
|
* [Helpers](#helpers)
|
|
17
18
|
* [How to Contribute](#how-to-contribute)
|
|
18
19
|
* [License and Copyright](#license-and-copyright)
|
|
@@ -34,6 +35,20 @@ console.log(html);
|
|
|
34
35
|
|
|
35
36
|
It's just that easy! No need to add Handlebars to your project, it's already included.
|
|
36
37
|
|
|
38
|
+
## Using Handlebars Helpers
|
|
39
|
+
|
|
40
|
+
If you only want to use handlebar helpers you can easily do that by doing the following:
|
|
41
|
+
|
|
42
|
+
```javascript
|
|
43
|
+
var helpers = require('@jaredwray/fumanchu').handlebarHelpers;
|
|
44
|
+
var handlebars = require('handlebars');
|
|
45
|
+
helpers({ handlebars: handlebars });
|
|
46
|
+
var fn = handlebars.compile('{{add value 5}}');
|
|
47
|
+
console.log(fn);
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Notice that in this scenario you are accessing helpers via `handlebarHelpers` from `fumanchu` instead of just using handlebars via fumanchu directly.
|
|
51
|
+
|
|
37
52
|
## Helpers
|
|
38
53
|
More than 180 Handlebars helpers in ~20 categories. Helpers can be used with Assemble, Generate, Verb, Ghost, gulp-handlebars, grunt-handlebars, consolidate, or any node.js/Handlebars project.
|
|
39
54
|
|
package/index.js
CHANGED
package/package.json
CHANGED