generator-backbone
generator-backbone copied to clipboard
Having problems with css files from bower packages (e.x. Font Awesome), don't compile or compile incorrectly.
Let's take the example of Font Awesome, the way I do it is:
-
bower install font-awesome -
Set the path in index.html:
<!-- build:css(.tmp) styles/main.css --> <link rel="stylesheet" href="styles/main.css"> <link rel="stylesheet" href="bower_components/foundation/css/foundation.css"> <link rel="stylesheet" href="bower_components/github-markdown-css/github-markdown.css"> <link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css"> <!-- endbuild --> -
run
grunt build -
Find myself with a
6ff87232.main.cssfile but its void of font-awesome
If I change the html like so:
<!-- build:css(.tmp) styles/main.css -->
<link rel="stylesheet" href="styles/main.css">
<!-- endbuild -->
<!-- build:css styles/bower.css -->
<link rel="stylesheet" href="bower_components/foundation/css/foundation.css">
<link rel="stylesheet" href="bower_components/github-markdown-css/github-markdown.css">
<link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css">
<!-- endbuild -->
It half-works, that is I get a xxxxx.bower.css but get errors like:
downloadable font: download failed (font-family: "FontAwesome" style:normal weight:normal stretch:normal src index:1): status=2147746065
source: http://157.157.70.14:8009/fonts/fontawesome-webfont.woff?v=4.2.0 558fb0dc.bower.css:4
downloadable font: download failed (font-family: "FontAwesome" style:normal weight:normal stretch:normal src index:2): status=2147746065
source: http://157.157.70.14:8009/fonts/fontawesome-webfont.ttf?v=4.2.0
due to relative paths.
So I'm wondering, what can I do to fix this or how do you deal with bower package css files?
It seems if I do bower install font-awesome --saveinstead of bower install font-awesome it works as expected.
That is expected. If you don't save it, wiredep doesn't know about it.