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
Added proposed 'override' option. #27
Conversation
This is the proposed change to the spec described in bower/bower#585 with one addition - the ability to specify a path to a .json file instead of an inline object literal value to override, and the option to either replace the dependency's original bower.json value or merge with the original.
I'm not sure about this feature to be specified in I'd love if
I guess hash syntax is OK too. |
A
Placing these overrides in This is probably a long shot, but does this sound interesting? bower override underscore="path/to/my/underscore/override.json" |
@unscriptable It is not that easy to persuade authors to maintain their bower.json. I think we could encourage authors to copy fixed bower.json from Bower would take overrides from |
Also most authors won't edit old tags in their repositories, so global override is practically the only way to fix old releases of bower components (see for example tenex/rails-assets#124 (comment)) |
👍 |
1 similar comment
👍 |
My override format proposal (e.g.
It means since version Any suggestions or comments? |
👍 Most of my thoughts can be found in #38, but I personally like the approach taken by the gulp plugin main-bower-files for package consumers: {
"name": "your-package-name",
"dependencies": {
"<bower-package>": "*"
},
"overrides": {
"<bower-package>": {
"main": "some-file.js"
}
}
} Or, {
"overrides": {
"<bower-package>": {
"main": {
"development": "file.js",
"production": "file.min.js",
}
}
}
}
@sheerun How would that overrides format translate to package consumers? |
I think we could standardize "overrides" entry in same format as wiredep or main-bower-files, and make note that current bower version doesn't implement this field yet, so you need to use external tool. I think these plugins are proof that community really needs this field. @sindresorhus I'd urge you to merge this PR. |
I'm only not sure if we should standardize the "replace" and "path to bower.json" behavior. |
@sheerun I won't merge this as I think it's a bad idea. Though this is really up to you, so feel free to merge if you think it's a good idea. I'm not really much involved anymore. |
@sindresorhus Just out of curiosity, why do you think it's a bad idea? |
@mnquintana It's in multiple old issues. I have no interest in discussing this further :) It's up to @sheerun now. |
@sheerun any hope here? |
I need to find and read those multiple old issues first. Maybe you can help. Also, maybe it would be better to implement overrides on registry level for consistency. That is, allow for specifying custom registry where all overrides are stored. |
It would be great if there was some sort of spec on the matter, as a lot of people have already started implementing their own thing to great success (such as the mentioned For example, Which is great and dandy until another tool chooses not to do it that way, there's fragmentation. I've seen other tools use Then there's the discussion of what should it override? The If Bower remains silent on this, everyone in their community does their own thing. The community is obviously very much behind this idea as it's in use all over. At this point, we need to figure out how we can all come to a compromise, as it's much easier to say, "we should do it this way because Bower (the source) recommends it this way," than to say, "well, I feel it should be done this way, and there's not even an 'unofficial' spec to go off of, so why shouldn't I?" |
Updates on this one? |
I was looking for this documentation - is there a reason it hasn't been merged yet? Also, it would be great to include an example! Thanks. |
Any news on this? |
Yes, it's not needed anymore, because override option can be implemented by Pluggable Resolver. Unfortunately it won't be implemented by Bower itself (we can incorporate resolver in 2.0 version, though). Also, I'm thinking of "Pluggable Postprocessors" in addition to Pluggable Resolvers: bower/bower#1930 |
This is the proposed change to the spec described in bower/bower#585 with one addition - the ability to specify a path to a .json file instead of an inline object literal value to override, and the option to either replace the dependency's original bower.json value or merge with the original.