【问题标题】:Grunt/bower Bourbon Upgrade breaks font-face mixinGrunt/bower Bourbon Upgrade 打破了字体混合
【发布时间】:2015-10-06 08:14:37
【问题描述】:

我刚刚升级了我的 grunt/angular 项目

"bourbon": "3.2.0",
"neat": "1.5.0",

"bourbon": "~4.2.3",
"neat": "~1.7.2",

(来自我的 bower.json)

在此次升级过程中,bourbon 文件结构从:

bower_components/bourbon/dist/bourbon'

到:

bower_components/bourbon/app/assets/stylesheets/bourbon'

这个我已经掌握了,或者至少我认为我掌握了。

现在,每当我尝试使用 grunt 构建时,都会遇到以下 sass 问题:

Running "sass:dist" (sass) task
Warning: [my_app_path]/bower_components/bourbon/app/assets/stylesheets/helpers/font-source-declaration:22: error: error reading values after eot

问题出现在格式映射中的第一个条目中:

@function font-source-declaration(
  $font-family,
  $file-path,
  $asset-pipeline,
  $file-formats,
  $font-url) {

  $src: ();

  $formats-map: (
    eot:  "#{$file-path}.eot?#iefix" format("embedded-opentype"),
    woff2: "#{$file-path}.woff2" format("woff2"),
    woff:  "#{$file-path}.woff" format("woff"),
    ttf:  "#{$file-path}.ttf" format("truetype"),
    svg:  "#{$file-path}.svg##{$font-family}" format("svg")
  ); 

首先,我如何验证 $file-path bourbon 试图引用的内容?我浏览了其他 .scss 文件,但没有看到硬定义,甚至没有看到以编程方式确定的路径(我认为这可能只是因为我不知道去哪里寻找。

我是否缺少另一个依赖库?

在红宝石方面我有 萨斯(3.4.16) scss_lint (0.40.1)

scss_lint 从 scss-lint 0.26.2 升级(包名从 hypen 更改为下划线)

【问题讨论】:

    标签: node.js sass gruntjs bower bourbon


    【解决方案1】:

    所以,问题在于应用程序使用了非常旧的 grunt-sass 版本。

    我将它从 0.14.0 升级到 ^1.0.0,一切正常。

    【讨论】:

      猜你喜欢
      • 2016-05-11
      • 1970-01-01
      • 1970-01-01
      • 2014-10-03
      • 1970-01-01
      • 2019-06-22
      • 2016-01-01
      • 1970-01-01
      • 2015-01-31
      相关资源
      最近更新 更多