短期的には、それを機能させることはできません。フィルタはそれを自分で適用していないようです。
私は、MVC3かみそりアプリケーションでcombresを動作させようとしています。そして、DotLessCssFilterを除いてすべてが機能します。
ドキュメントにはそれが書かれていますIn order to apply a filter to your resource sets, you need to modify your Combres config file
私はcombres.configを次のように変更しました:
<combres xmlns='urn:combres'>
<filters>
<filter type="Combres.Filters.DotLessCssFilter, Combres" acceptedResourceSets="dotLessCss" />
</filters>
<resourceSets url="~/combres.axd" defaultDuration="30" defaultVersion="1" defaultVersionGenerator="Combres.VersionGenerators.Sha512VersionGenerator">
<resourceSet name="siteCss" type="css">
<resource path="~/UI/Styles/1140.css" />
<resource path="~/UI/Styles/typeimg.css" />
<resource path="~/UI/Styles/layout.css" />
</resourceSet>
<resourceSet name="siteJs" type="js">
<resource path="~/UI/Scripts/opt/util.js" />
<resource path="~/UI/Scripts/opt/core.js" />
</resourceSet>
</resourceSets>
</combres>
そして、それはファイルを結合し、必要に応じて最小化します。
私のファイルの1つに、単純な構文がありません。
@sprite: url(/ui/styles/sprite.png);
.foo {
background-image: @sprite;
}
しかし、それは決してフィルターを通過しないようです。
これがMVCの問題なのか、一般的な問題なのかわからない。
誰かがこのフィルターをうまく使用しましたか?
どうでも!(編集)
答えを見る