yeoman / generator-backbone

Scaffold out a Backbone.js project
http://yeoman.io
638 stars 159 forks source link

Having problems with css files from bower packages (e.x. Font Awesome), don't compile or compile incorrectly. #319

Closed 01AutoMonkey closed 7 years ago

01AutoMonkey commented 9 years ago

Let's take the example of Font Awesome, the way I do it is:

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?

01AutoMonkey commented 9 years ago

It seems if I do bower install font-awesome --saveinstead of bower install font-awesome it works as expected.

eddiemonge commented 7 years ago

That is expected. If you don't save it, wiredep doesn't know about it.