grunt-contrib-handlebars icon indicating copy to clipboard operation
grunt-contrib-handlebars copied to clipboard

How to add Custom Helpers

Open standon1978 opened this issue 9 years ago • 2 comments

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.

standon1978 avatar Jun 19 '15 15:06 standon1978

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

skotchio avatar Aug 23 '15 18:08 skotchio

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: [email protected] To: [email protected] CC: [email protected] 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.

standon1978 avatar Aug 24 '15 08:08 standon1978