esamattis / requirejs-hbs

Simple Handlebars loader plugin for RequireJS
Other
79 stars 22 forks source link

Added option to specify a base directory #22

Closed sasha-bichkov closed 8 years ago

sasha-bichkov commented 8 years ago

Hi there!

I want to reduce my code, so I've added the "base" option into hbs.

hbs: {
   base: 'templates'
}

Now I'm writting

define(function(require) {
   var template = require('hbs!example.hbs');
   ...

instead of

define(function(require) {
   var template = require('hbs!templates/example.hbs');
   ...