-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
UMD tests #13843
UMD tests #13843
Conversation
Added Browserify tests. Not sure whether or not to include the |
I can't comment on all the changes at the moment but see #13842 (comment) |
@hnrch02 Please rebase; this currently has merge conflicts. |
Should be rebased now. I want to know if the level of hackyness is acceptable and if not how we could improve it. |
Rebased again, now that #13842 has been merged. |
var footer = ' })\n\n' + | ||
'}();\n' | ||
|
||
return src.replace(umd, '').replace(footer, '}();\n') |
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.
Should use RegExp.quote here?
Yeah, hacky indeed.
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.
Why would we need that?
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.
process
runs before each file is added to the concatenated output, so unless the UMD stuff is included twice in a source file, I don't see a problem.
I'll squash the commits once this is ready to merge. |
Also added the fix to concatenated files built using the customizer. |
So how are we gonna go about this? Will we revert the revert after 3.2 is released and work from there or are we moving the UMD stuff to a separate branch? |
Punting to v4 checklist. |
As suggested in #13811, here are tests/examples of using Bootstrap with RequireJS and Browserify. Both working with the concatenated file and using individual plugins is being demonstrated.
This also includes a fix for #13812, which removes the module definitions from the individual plugins and wraps them all in one big factory function. It's pretty hacky so I'd like to get feedback on it.
/cc @fat @cvrebert @XhmikosR