【发布时间】:2012-03-08 18:38:43
【问题描述】:
其实这是两个问题:
在 Windows 的 Symfony 项目中使用 SCSS 过滤器的正确方法是什么(在 Twig 模板中)? 我的意思是,我如何在 windows 中使用 scss 二进制文件?
另外,我一定需要使用 Compass 吗?如果我安装了指南针,“如何”使用它?
扩展:这是我做的一些配置:
在 app/config/config.yml
assetic:
debug: %kernel.debug%
use_controller: false
filters:
scss:
bin: "%kernel.root_dir%/Resources/libs/scss"
compass:
bin: "%kernel.root_dir%/Resources/libs/compass"
在我的树枝文件中:
{% stylesheets
'@PlaylyfeBaseBundle/Resources/public/css/base.scss'
'@PlaylyfeBaseBundle/Resources/public/css/another.scss'
filter='scss'
output='css/compiled/total.css'
%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
但是,当我加载页面时,我收到以下错误(在 css 文件中)
[exception] 500 | Internal Server Error | RuntimeException
[message] The filename, directory name, or volume label syntax is incorrect.
[1] RuntimeException: The filename, directory name, or volume label syntax is incorrect.
at n/a
in C:\wamp\www\Symfony\vendor\assetic\src\Assetic\Filter\Sass\SassFilter.php line 162
at Assetic\Filter\Sass\SassFilter->filterLoad(object(Assetic\Asset\FileAsset))
in C:\wamp\www\Symfony\vendor\assetic\src\Assetic\Filter\FilterCollection.php line 62
at Assetic\Filter\FilterCollection->filterLoad(object(Assetic\Asset\FileAsset))
in C:\wamp\www\Symfony\vendor\assetic\src\Assetic\Asset\BaseAsset.php line 83
at Assetic\Asset\BaseAsset->doLoad('
【问题讨论】:
-
目前还没有“正确”的答案...作为记录,我目前正在做的是我正在使用 watch 在后台运行 scss 到 css 转换器 标记打开,这样当我编辑我的 scss 文件时,新的 css 文件会即时生成...