yeoman发电机字体真棒 [英] yeoman generator font awesome

查看:157
本文介绍了yeoman发电机字体真棒的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用yeoman移动生成器创建了一个移动应用程序。

现在我想添加字体真棒。我尝试了这个,但在编译过程中并不真正起作用。一个小小的建议或经验会很棒

好的,这真的有点不清楚。抱歉。

编译过程正常,但控制台说404没有找到字体。

我不清楚如何做到这一点的好方法。从scss文件创建CSS,在index.html中使用< - build:... - >或其他内容实现.min.css!



当我在主.scss文件中添加此字体时,字体将不会被找到。

  $ fontAwesomePath: ../bower_components/font-awesome/fonts; 
@import'../bower_components/font-awesome/scss/font-awesome.scss';

Grunt复制并重命名字体文件f.e.到:

  5a6b8fb8.FontAwesome 


解决方案

好的,

似乎可以通过

   bower install --save font-awesome 





然后, index.html解决了我的问题。

 <! -  build:css styles / vendor / fontawesome.css  - > 
< link rel =stylesheethref =bower_components / font-awesome / css / font-awesome.min.css>
<! - endbuild - >



感谢@OddEssay和@bpaul的帮助!!


I created a mobile application with the yeoman mobile-generator.
Now I want to add font awesome. I tried
this, but not really works in the compiling process. A small advice or experience would be great

Okay, it's really a bit unclear. Sorry.
The compiling process works, but console says 404 not founds for the fonts.
It's not really clear to me how is a good way to do this. Creating the CSS from the scss files, implemeted the .min.css in the index.html with "<-- build: ... -->" or something else?!

When I add this in my main .scss file the the fonts would not be found.

$fontAwesomePath: "../bower_components/font-awesome/fonts";
@import '../bower_components/font-awesome/scss/font-awesome.scss';

Grunt copies and renames the font files f.e. to:

5a6b8fb8.FontAwesome

解决方案

Ok,
seems I could fixed this with the help of this answer.
Installed font awesome with bower:

bower install --save font-awesome


Then simply this line in the index.html fixed my problem.

<!-- build:css styles/vendor/fontawesome.css -->
<link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css">
<!-- endbuild -->


Thanks @OddEssay and @bpaul for our help!!

这篇关于yeoman发电机字体真棒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆