1

我正在尝试在 symfony2.5 中实现一些小项目,当我将指南针的配置添加到我的配置文件并安装了所有需要的包(ruby、sass、compass)时,尽管我正在尝试资产:转储CSS我得到以下

Error Output:                                                                                                                                                                         
  Error: File to import not found or unreadable: compass.                                                                                                                               
         Load path: /path/to/project/CoreBundle/Resources/public/css                                                                                                   
          on line 6 of /tmp/assetic_sassE4kCr8

如果我删除@import“指南针”;@import "compass/css3" 我仍然遇到同样的问题;和@import“指南针/实用程序/精灵”;

在我的 config.yml 中,我得到如下资产集:

assetic:
    debug:          "%kernel.debug%"
    use_controller: false
    bundles:        [ FundCoreBundle ]
    filters:
        scss:
            bin: "/usr/local/bin/sass"
        compass:
            bin: "/usr/local/bin/compass"

我的 CSS 创建如下:

{% stylesheets
        '@FundCoreBundle/Resources/public/css/style.scss'
        filter='compass'
        output='css/*.css'

        %}
    <link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}

我的scss文件如下

/* Compass utilities*/
// Use one CSS3 mixin instead of multiple vendor prefixes.
// @import "compass/support";
// @import "compass/reset";
@import "compass/css3";
@import "compass";
// See http://compass-style.org/help/tutorials/spriting/
@import "compass/utilities/sprites";
// Helps set up a vertical rhythm.
// @import "compass/typography/vertical_rhythm";

// Sass utilities
@import "helpers/variables";
@import "helpers/mixins";

// Vendors and external stylesheets
// @import "vendors/mmenu/jquery.mmenu";
@import "vendors/bootstrap/bootstrap";

// Base stuff
@import "base/typography";
@import "base/normalize";
@import "base/main";

将 compass +ccs3 + sprites 导入 symfony 项目的正确方法是什么?

4

0 回答 0