kaanon/gulp-compile-handlebars — pull request #7 by jehoshua02 (2014-10-11 09:56:12+00:00)
Title: Remove All of Base Url From Registered Partial Name

I like to put partials for each page in a subdirectory named after the page and currently I have to manually configure gulp to register partials from each directory.

So, instead of this:

somefile.hbs

```hbs
{{> blocks/header}}
```

gulpfile.js

```javascript
var options = {
batch: ['./src/hbs/blocks']
};
```

I want to do something like this:

```javascript
var options = {
batch: ['./src/hbs']
};
```

This allows me to reference the partial in a template without the part from the base path. And now I don't have
to update the gulpfile every time I want to create a directory with partials in it.

Some things to note:

+ This pull request is more of a proof of concept. Code speaks better than words sometimes.
+ Not having much experience with authoring node modules or gulp plugins, I'm sure there's room for improvement. I'm willing to update anything necessary -- docs, tests, etc. -- if you like my changes. I didn't want to spend time on it if the changes would be rejected.
+ I am sleep deprived. Maybe I'm thinking about this all wrong? Perhaps it would be better to do something like prefix partials with underscores if I'm going to have them all over the place instead of in one directory? Because doing it the way I'm proposing here would register non-partial templates too, I think. That may or may not be an issue though?

Anyway, thanks for the plugin!