其實,這是兩個問題:如何在Windows下使用Symfony2中的SCSS過濾器?
什麼是Windows使用SCSS過濾器在我的Symfony項目的正確方法(在嫩枝模板)? 我的意思是,我如何在Windows中使用scss二進制文件?
另外,我是否需要使用Compass?和「如何」,如果我安裝了它,我會使用羅盤嗎?
擴展:下面是一些配置我做:
在應用程序/配置/ 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('
目前還沒有 「正確」 的答案了...... 對於記錄,我目前正在做的是,我正在運行scss到css轉換器,並在* watch *標誌的背景下,以便在編輯我的scss文件時,新的css文件將在飛行中生成。 – 2012-03-15 11:06:41