Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add Custom Helpers #142

Open
standon1978 opened this issue Jun 19, 2015 · 2 comments
Open

How to add Custom Helpers #142

standon1978 opened this issue Jun 19, 2015 · 2 comments

Comments

@standon1978
Copy link

I have created a set of custom helpers which I want to include with my build (AMD). Where do I specify the path of helpers to be included.

@skotchio
Copy link

@standon1978 I have the save problem. Did you find a way?

@standon1978
Copy link
Author

I am included the following in my gruntfile.
Option 1:
grunt.config('handlebars.options.amd', ['handlebars','helper/hbs/helpers']);
Here handlebars is the handlebars.js file location and helper/hbs/helpers is the cutom helper/hbs/helpers.js file with my helpers I am using requireJs so was able to specify all the AMD modules to be loaded as an array.
Option2: At the start of you application you can initialize the custom handlebars class manually which basically attaches your template on the handlebar object.
Regards,Sameer Tandon

Date: Sun, 23 Aug 2015 11:31:01 -0700
From: notifications@github.com
To: grunt-contrib-handlebars@noreply.github.com
CC: sa_tandon@hotmail.com
Subject: Re: [grunt-contrib-handlebars] How to add Custom Helpers (#142)

@standon1978 I have the save problem. Did you find a way?


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants