rpflorence/broccoli-es6-module-filter — pull request #4 by ppcano (2014-04-12 17:35:36+00:00)
Title: Add `moduleGenerator` option to set the module name based on filePath

This pattern is broadly used in rake pipeline filters as the [minispade filter](https://github.com/wycats/rake-pipeline-web-filters/blob/master/lib/rake-pipeline-web-filters/minispade_filter.rb).

It allows to use the filter with more different project structures or build process.

```js
var es6Options = { moduleGenerator: function(filePath) {
return filePath.replace(tmpFolder+'/', '')
.replace('lib/','')
.replace(/.js$/, '')
.replace(/\/main$/, '');
},
anonymous: false };

app = es6Filter(app, es6Options);
```