-
-
Notifications
You must be signed in to change notification settings - Fork 78.5k
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
grunt-bower-task produces flat folder, but css assumes glyphicons in ../fonts #12805
Comments
But the Glyphicons are in ~ $ bower install twbs/bootstrap#3.1.1
<successfully installs>
~ $ cd bower_components/bootstrap/dist/css/
~/bower_components/bootstrap/dist/css/ $ grep halflings bootstrap.css
src: url('../fonts/glyphicons-halflings-regular.eot');
src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
~/bower_components/bootstrap/dist/css/ $ file '../fonts/glyphicons-halflings-regular.ttf'
../fonts/glyphicons-halflings-regular.ttf: TrueType font data I'm clearly not understanding what the problem is. |
When you use grunt-bower-task to install bootstrap, it flattens out the js, css, and fonts because bootstrap's main in bower.json is incorrect.
When you define files in bower.json's main, it flattens them out into the target folder.
It produces a folder structure that will correctly resolve ../fonts/:
I believe this is an issue with Bootstrap because it's main in bower.json is the root cause. |
My reading of the |
@zgardner I still don't entirely get what you're doing. You're using |
I just tried byComponent, and it still produces the same directory structure for Bootstrap. I noticed that some projects like Underscore and requirejs-tpl produce a directory structure if I include them in the bower dependencies. They don't have a main though. |
I propose you use |
Per bower/spec#19 , Closing this since it's a |
FYI, I got this to work in grunt-bower-task by changing my layout to byComponent and using the following in my bower.json:
|
Here's my slightly simpler fix for this: (in "exportsOverride": {
"bootstrap": {
"/": "dist"
}
} It installs only the contents of the |
The main config in bower.json lists the following:
When using grunt bower:install, it flattens out the folders, and copies those files to ./lib/bootstrap
This is a problem because bootstrap.css assumes the glyphicons files are in ../fonts:
If I change main to the following:
It produces what I think is the correct structure:
The text was updated successfully, but these errors were encountered: