Comments (14)
I think on one hand we need to point out the main entries for js/css, on the other hand there's definitely a need to have a list of assets
for packaging purpose. It'd be nice for future version of Bower to spec this up. Glob support might be a nice fit for the list of assets
.
from spec.
@donaldpipowitch Main should only include main css and javascript endpoint.
Please don't include templates there.
from spec.
?
No templates? Why that? Any why just CSS and JavaScript? I would like to use Bower for all reusable assets - that shouldn't be to uncommon. Bootstrap includes Fonts as well.
from spec.
Main specifies only endpoints, not all files that you want to use with bower.
If you want to use those files, just don't ignore them.
from spec.
So Bootstrap misuses the main
property in this case? And every non-ignored file inside a Bower package is declared as a reusable asset by default?
from spec.
Yes, I think bootstrap misuses main
. They use relative paths in css anyway: https://github.com/twbs/bootstrap/blob/master/dist/css/bootstrap.css#L266
I don't know what you mean by reusable asset, but all assets that are not ignored can be used in build process by grunt, gulp etc.
I wonder what other @bower developers think.
from spec.
I don't think globs in main
are a good pattern, but I can see its utility. It should work with bower list --path
.
This is part of a larger discussion around what main
really is.
from spec.
I tend to think that any time a collection of paths is acceptable, that a glob should be able to be used.
from spec.
IMO, it's a bad practice https://github.com/webux/ux-angularjs-datagrid use glob in its bower's main. As consequence, the integration with grunt wiredep doesn't work...
from spec.
I agree with you that it is a bad practice right now, because it isn't officially specified. However, if it would be part of the bower spec it would be no problem to add this feature to wiredep. I wouldn't say its bad per se.
from spec.
from spec.
I would also be interested in an official line on this in the specification. Globs can be useful for including a bunch of images, although I can also see that not supporting globs might make a developer think a bit more about what is being included.
from spec.
@desandro Could you close this since #43 has been merged?
from spec.
Closing as "no." But the general issue is still up for discussion. We'll be evaluating a separate data point to list all files used, like files
that could contain globs.
from spec.
Related Issues (20)
- bower validate? HOT 1
- Should `main` contain individual JS files or one concatenated JS file? HOT 4
- "overrides" property proposal HOT 3
- Proposal for an optional "supportedVersions" property HOT 2
- main and ignore are optional, but bower complains if missing HOT 1
- How should local components be specified and consumed to avoid duplication? HOT 1
- files: list all required files for build tools HOT 71
- Version the spec itself HOT 5
- Add the possibility to host custom fields in the bower.json HOT 5
- Rename repository to bower-spec and add .bowerrc specificaton HOT 5
- dependencies and devDependencies automatically pull the latest commit when url has #latest suffix ? HOT 1
- Inconsistencies for version, main, ignore attributes HOT 1
- Formatting of Deprecated is Confusing HOT 1
- example of environment variables seems incorrect HOT 2
- config spec does not document hooks HOT 1
- main property for es6 module version HOT 1
- Author clarification
- save and save-exact aren't listed in the spec
- Concurrent bower install error.
- Default value of `private` field is not specified. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spec.