-
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
main
should only contain filename(s), not directories, right?
#19
Comments
Correct, |
Hey guys, I love bower! But I'm concerned that it increasingly seems to only want to handle non-modular libs. This issue seems to be a good example. Specifically, how does a modular library define its selection (i.e. folders) of available modules and define which one of these modules is the "main module"? mout doesn't have a main module, but most other libs do. In modular environments (node, AMD), the main module must be explicit if it's not the default (index or main) and most libs don't use the default. In npm, this is solved by package.json's "main" property. This property indicates the main module and anything not explicitly ignored is copied into the local application. How do we do this with bower? How do we indicate which files should be copied and which one is the main module? Thanks! |
@unscriptable see #9. |
Is that actually enforced anywhere? |
I don't see how #9 is a scalable solution, tbh. :( |
@cvrebert re: bower-requirejs, we added directory support as a crappy stop gap until moduleType landed. Now that moduleType is in, we're working on adding CommonJS package support. In the future it might make sense for us to throw a warning, instead of building a path to a dir. |
The docs for main say it represents:
It then states that it can be used by build tools. In Bootstrap's case, it's true that bootstrap.js, bootstrap.css, and the fonts are the primary acting files.
I think the first option is preferable. Right now, repos must have non-flat versions of files and flat versions of files just for Bower. |
Bootstrap current "main": [
"./dist/css/bootstrap.css",
"./dist/js/bootstrap.js",
"./dist/fonts/glyphicons-halflings-regular.eot",
"./dist/fonts/glyphicons-halflings-regular.svg",
"./dist/fonts/glyphicons-halflings-regular.ttf",
"./dist/fonts/glyphicons-halflings-regular.woff"
] All the files exist and there aren't multiple files per extension in the array. Theres only one css, js, etc. The only thing old about it is the font set. I might suggest that those be packaged as their own bower repository as |
Just making absolutely sure. See twbs/bootstrap#12805
(And yes, I know it should really be only 1 file (bower/bower#946), but it's been 3 months and
files
still has yet to been added to your spec.)The text was updated successfully, but these errors were encountered: