phated/gulp-wrap-amd — pull request #10 by mattma (2014-12-18 02:01:42+00:00)
Title: add a new option, modulePrefix

I am working on Ember-Cli enabled Ember application. It requires a prefix before each AMD module. For example, If I have a file path of `client/app/templates/application.hbs` and I run `gulp-wrap-amd` with `options.moduleRoot: 'client/app/'`, I have an output amd module name of `define("templates/application",`. It is good. But I want to add an prefix to it. So the output I want is `define("rocks/templates/application",` with `modulePrefix: 'rocks'`.

With my fork, it detect `modulePrefix` options, only execute it when it is defined. then, it will check user's input value on `modulePrefix`, prepend `modulePrefix` plus `/` to `options.name`. So we get an end result of `define("rocks/templates/application"`

When I uses [gulp-define-module](https://github.com/wbyoung/gulp-define-module) with the customization of [here](https://github.com/mattma/ember-rocks/blob/master/src/skeletons/core/gulpfile.js#L172). It requires a lot of customization work. Then I fork the gulp-define-module project to simply things. Then I saw your [comments](https://github.com/wbyoung/gulp-define-module/issues/3). I have a working solution for my case.

```
.pipe($.wrapAmd({
deps: ['exports'], // dependency array
params: ['__exports__'], // params for callback
moduleRoot: 'client/app/', // include a module name in the define() call, relative to moduleRoot
modulePrefix: 'rocks/'
}))
```

I have fully tested in my local environment. It works great. If you omit the `modulePrefix` option, it will do the exactly same thing like what you currently have. So it is completely backward compatible update.

If you think it benefits for the project, I would like to update documentation, tests, along with the fork. Thanks.