Closed izeau closed 9 years ago
I appreciate you doing this, but my vote is still no. This library's job is only to be an extension of Bower that speaks its language and adds on a responsibility Bower core doesn't have: automatic file reference injection. It was only after much consideration I let "overrides" in, since it was a necessary band-aid while the Bower community was developing, with a lot of developers not filling out "main" in their bower.json.
The Bower spec says a package can list multiple files as a "main" property, but they also recommend not packaging minified files. I agree with this recommendation, as there are many other tools that exist that will safely minify, as well as concatenate, scripts. If there are use-cases outside of minified vs. non-minified code that you would use this feature for, please let me know.
// @CWSpear @ruyadorno for opinions
I don't really like it either. If you're going through all this effort to create a build script, it's trivial to add minification at this point. In fact, I would highly recommend concatenation and minification.
I'm also with @stephenplusplus and @CWSpear, this does not follow the Bower specs and is much preferable to just use concatenation and minification for your production environment.
@izeau one thing you can do is to maintain your own fork if you really think this is a valuable feature for you/your corporation. I'm doing something similar at: https://github.com/SunGard-Labs/sg-wiredep you might want to take a look at that.
Thanks again for stepping up to help out @izeau, this is just one we aren't ready for yet :)
Resolves issue #112 that was previously closed.
The idea is to declare multiple
main
overrides, in order to support different environments, such asproduction
,development
,test
, etc.Use case: I want to use
jquery.min.js
for my production environment, andjquery.js
during development for easier debugging. I can now override main files in mybower.json
:I understand you didn’t want to modify wiredep’s usage of
overrides
, but this is a trivial change to the codebase and a huge advantage for developers, so I hope you’ll reconsider your decision. This syntax is used by other libs, such asmain-bower-files
.