使用Foundation 5.5的弃用警告使grunt任务失败

时间:2016-01-19 19:14:00

标签: angularjs zurb-foundation compass-sass grunt-contrib-sass

我试图运行基于Yeoman的生成器的AngularJS项目,但使用的是Zurb Foundation 5.5.3

我已经读过,如果基础5.4使用Sass 3.4.2进行编译会有一些问题,但显然基金会5.5会保留它。 当我尝试运行sass任务时,由于弃用警告,构建过程失败。这是日志:

@profile

这是我的Gruntfile:

Running "wiredep:sass" (wiredep) task

Running "concurrent:server" (concurrent) task
    Warning: DEPRECATION WARNING on line 78 of C:/Users/lperea/Documents/Proyectos/Kairos/kronos-imasd-frontend/bower_components/foundation/scss/foundation/components/_top-bar.scss: #{} interpolation near operators will be simplified
    in a future version of Sass. To preserve the current behavior, use quotes:

      unquote("#{lower-bound($medium-range)}") Use --force to continue.

我使用指南针1.0.3和sass 3.4.2。

1 个答案:

答案 0 :(得分:1)

看起来SASS 3.4.2和Foundation 5.5.3的那些版本不能很好地相处,因为Foundation 5.5.3使用了不推荐的SASS功能,要解决这个问题,你可以:升级你的Foundation版本,或按照消息中的建议进行操作,您可以转到_top-bar.scss第78行并替换

#{lower-bound($medium-range)}

使用:

unquote("#{lower-bound($medium-range)}")

成功完成构建过程。

希望这有帮助!

相关问题