-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Inheritted group combo params #1838
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
base: dev-3.x
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2637,6 +2637,7 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' + | |
| var inserted = (self.ignoreRegistered) ? {} : self.inserted, | ||
| comboSources = {}, | ||
| maxURLLength, | ||
| combine, | ||
| comboMeta, | ||
| comboBase, | ||
| comboSep, | ||
|
|
@@ -2654,10 +2655,17 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' + | |
|
|
||
| group = self.groups[mod.group]; | ||
|
|
||
| // Set sensible defaults for these on each iteration to ensure we don't leak. | ||
| combine = self.combine; | ||
| comboBase = self.comboBase; | ||
| comboSep = self.comboSep; | ||
| maxURLLength = self.maxURLLength; | ||
|
|
||
| if (group) { | ||
| if (!group.combine || mod.fullpath) { | ||
| if (typeof group.combine === 'boolean') { | ||
| combine = group.combine; | ||
| } | ||
| if (!combine || mod.fullpath) { | ||
| //This is not a combo module, skip it and load it singly later. | ||
| addSingle(mod); | ||
| continue; | ||
|
|
@@ -2668,9 +2676,18 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' + | |
| mod.root = group.root; | ||
| } | ||
|
|
||
| comboBase = group.comboBase; | ||
| comboSep = group.comboSep; | ||
| maxURLLength = group.maxURLLength; | ||
| if (typeof group.comboBase === 'string') { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we care about
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why wouldn't we? It should be possible to either specify a comboBase for a group, or to use the inheritted one. There are reasons you may want to do so, largely developer related admittedly.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't have a personal stance in this case. But should we stick to backwards compatibility (
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. guys, let's stick to the previous behavior, there is not need to change that behavior now. |
||
| comboBase = group.comboBase; | ||
| } | ||
| if (comboBase !== self.comboBase) { | ||
| // It only makes sense to use a different combo loader settings if the comboBase is different. | ||
| if (typeof group.comboSep === 'string') { | ||
| comboSep = group.comboSep; | ||
| } | ||
| if (typeof group.maxURLLength !== 'undefined') { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Number?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What if maxURLLength is a string containing a Number?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. YUI is pretty biased towards strict typing. Let's go with the trend.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. again, previous behavior. |
||
| maxURLLength = group.maxURLLength; | ||
| } | ||
| } | ||
| } else { | ||
| if (!self.combine) { | ||
| //This is not a combo module, skip it and load it singly later. | ||
|
|
||
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.
Just leave it as
@VERSION@. Grunt handles this replacement.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.
Yeah /o\