html - 当我运行 Grunt 时,它正在删除我的 CSS 文件

标签 html css angularjs gruntjs yeoman

我使用 bower 安装“font-awesome”css 包。然后我将 bower 组件路径添加到我的 html 中:

<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<!-- build:css(.) styles/vendor.css -->
<!-- bower:css -->
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="bower_components/animate.css/animate.css" />
<link rel="stylesheet" href="bower_components/bootstrap-duallistbox/src/bootstrap-duallistbox.css" />
<link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css" />
<!-- endbower -->
<!-- endbuild -->
<!-- build:css(.tmp) styles/main.css -->

当我运行 grunt serve 时,超棒的字体样式表消失了!

我正在做一个由 yeoman 搭建的 angular 元素。

最佳答案

于是我找到了解决办法。当构建运行时,该 HTML 部分由 bower 和 grunt 自动填充。无论出于何种原因,font-awesome 不会填充该区域。相反,我使用了 components-font-awesome:bower install components-font-awesome --save

关于html - 当我运行 Grunt 时,它正在删除我的 CSS 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37011332/

相关文章:

javascript - 设置输入最大值时出现插值错误

html - 为什么 firstsection CSS 类需要 calc(100% - 70px) 而不是 calc(100% - 75px) 才能在 CSS 和 HTML 中没有滚动条?

HTML 未链接到 CSS 文件

javascript - 表扩展的过渡

html - 如何在不更改边框颜色的情况下更改 Div 中的文本颜色

javascript - 如何实现与元素交互的功能?

css - ionic 列表插图中的中心文本

javascript - 带有 overflow hidden 子项的表格单元格的高度

angularjs - 如何在 ionic 中选择文本?

html - 滚动Angular2时锁定一个div