-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a new option, modulePrefix #10
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 |
.pipe(task({ | ||
modulePrefix: 'rocks/', | ||
deps: ['jade'], | ||
params: ['jade'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing comma
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.hbs
and I rungulp-wrap-amd
withoptions.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
moduleRoot
options, only execute it when it is defined. then, it will check user's input value onmoduleRoot
, prependmodulePrefix
plus/
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
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. @phated