gruntjs / grunt-contrib-handlebars

Precompile Handlebars templates to JST file.
http://gruntjs.com/
MIT License
282 stars 126 forks source link

Update handlebars.js #111

Closed AndrewEastwood closed 10 years ago

AndrewEastwood commented 10 years ago

Adding possibility to specify custom path to handlebars

tkellen commented 10 years ago

Any reason you can't do this in your AMD path configuration?

AndrewEastwood commented 10 years ago

I've tried to use path config for that:

path: {
    lib: 'default/js/libs',
    collection: 'default/js/collections',
    model: 'default/js/models',
    view: 'default/js/views',
    // and path to handlebars
    handlebars: 'default/js/libs/handlebars'
}

and I have custom wrapper for handlebars:

define('lib/handlebars', [lib/extensions], function () { /* handlebars lib goes here */   return Handlebars; })

And it seems that the requirejs can't resolve define(['handlebars']) in this case.

AndrewEastwood commented 10 years ago

And? :)

vladikoff commented 10 years ago

https://github.com/gruntjs/grunt-contrib-handlebars#amd