add a new option, modulePrefix#10
add a new option, modulePrefix#10phated merged 5 commits intogulp-community:masterfrom mattma:master
Conversation
|
This seems to match nicely with the P.S. - I like that you didn't need to modify the template. |
|
Thanks. I will implement those soon. |
|
@phated TAP testing framework is an very interesting choice. Is this better than Mocha? Is it a generic testing framework or is it only for stream testing? I have been using Mocha, Should for a long time. |
|
@phated I have updated the |
|
Just a few comments. Otherwise, it looks good. I chose to use TAP just because it feels a lot less heavy than mocha. I have been liking |
…refix defined but missing moduleRoot
|
Looks like 2 trailing commas were missed in the cleanup. The rest looks good. |
|
@phated Removed all the trailing commas. |
|
Awesome. Thanks. Will publish as 0.4.0 now |
|
published. |
|
Cheers! :) |
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.hbsand I rungulp-wrap-amdwithoptions.moduleRoot: 'client/app/', I have an output amd module name ofdefine("templates/application",. It is good. But I want to add an prefix to it. So the output I want isdefine("rocks/templates/application",withmodulePrefix: 'rocks'.With my fork, it detect
moduleRootoptions, only execute it when it is defined. then, it will check user's input value onmoduleRoot, prependmodulePrefixplus/tooptions.name. So we get an end result ofdefine("rocks/templates/application"When I uses gulp-define-module with the customization of here. It requires a lot of customization work. Then I fork the gulp-define-module project to simply things. Then I saw your comments. I have a working solution for my case.
I have fully tested in my local environment. It works great. If you omit the
modulePrefixoption, 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. @phated