Grunt Wiredep未注入Foundation CSS

3

我通过 bower(bower install foundation)在我的 bower_components 中安装了 Foundation。

同时,我的 Gruntfile.js 中也有 grunt-wiredep,如下所示:

    wiredep: {
      dev: {
       src: ['<%= FILE_PATHS.client %>/index.html']
      }
    }

另外,在我的index.html文件中也有

    <!-- bower:css -->
    <!-- endbower -->

运行 grunt wiredep:dev 后,注入了 foundation.js,但没有注入 foundation.css 或 foundation.scss。

我在 wiredep 配置方面是否遗漏了什么?它似乎可以拾取 font-awesome.css,但不能拾取 foundation 文件?

这个问题和最新版本的 Bootstrap 类似 http://blog.getbootstrap.com/2015/06/15/bootstrap-3-3-5-released/


你尝试过覆盖吗? - Sudheer
是的,它确实起作用了。在发帖之前我应该尝试一下。不过还是谢谢你的帮助!@Sudheer - kev_panda
1个回答

1
所以,我本应该先尝试这个方法,但与Bootstrap类似,我需要特别添加一个覆盖样式来适用于Foundation。
    "overrides": {
      "foundation": {
        "main": [
        "css/foundation.css",
        "js/foundation.js"
        ]
      }
    }

感谢您的建议,Sudheer。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接