【问题标题】:Grunt is deleting my CSS files when I run it当我运行 Grunt 时,它正在删除我的 CSS 文件
【发布时间】:2016-05-03 18:07:06
【问题描述】:

我使用 bower 安装了 'font-awesome' css 包。然后我将凉亭组件路径添加到我的 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 css angularjs gruntjs yeoman


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-01-02
      • 1970-01-01
      • 2019-04-03
      • 1970-01-01
      • 2021-01-29
      • 2013-07-01
      • 2021-05-24
      • 2020-03-29
      相关资源
      最近更新 更多