-
Notifications
You must be signed in to change notification settings - Fork 140
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
Should main
contain individual JS files or one concatenated JS file?
#36
Comments
It's not agreed upon, but I think foundation gets it right:
So I think it's best if:
Also, I think each file in
I think better approach is to select files you need, not filter out what you don't.
Bootstrap-sass seems improper bower component anyway. It uses custom load path instead relative paths. Bower unfortunately doesn't allow for defining load paths for precompilers (maybe it's a good feature request? I think defining load paths is less ambiguous than "main" files). I guess it's ok for javascript libraries to include multiple files in main, but just because each file can be required individually, and maybe author doesn't want to put distribution files in the repository. Bootstrap's javascripts are a library, but bootstrap already includes concatenated javascripts in repository, so it's easier and more clear to just put one All to all, I think Does it answer your question? |
On second thought maybe including main Each entry of So for example
Defines three load paths:
And three main files for each compiler:
The only two required paths by bower would be for ... but only until |
Yeah, it's become some level of de facto standard; see links+discussion in twbs/bootstrap#13328.
That'll take a year at Bower's current rate. |
TL;DR:
|
https://github.com/bower/bower.json-spec#main says
main
shouldn't contain minified files but y'all also say it should be a single entrypoint, per #20.So, should we put a single concatenated (but not minified) JS file in
main
, or should we put all the individual basically-independent JS files inmain
?Context: twbs/bootstrap#14534
The text was updated successfully, but these errors were encountered: