javascript - Combres combine JS & CSS files but doesn't minify - Stack Overflow

hii've just added Combres to my ASP.NET MVC project and it bines the CSS files into one CSS and t

hi i've just added Combres to my ASP.NET MVC project and it bines the CSS files into one CSS and the JS files into one JS file smoothly, but for some reason it does that without minification.

any idea why ? (note- i just added the yui minifier. it doesnt press my file with it our with it...) here's my bres.xml :

<?xml version="1.0" encoding="utf-8" ?>
<bres xmlns='urn:bres'>
  <cssMinifiers>
    <minifier name="yui" type="Combres.Minifiers.YuiCssMinifier, Combres">
      <param name="CssCompressionType" type="string" value="StockYuiCompressor" />
      <param name="ColumnWidth" type="int" value="-1" />
    </minifier>
  </cssMinifiers>
  <resourceSets url="~/bres.axd" defaultDuration="30"
                                defaultVersion="auto"
                                defaultDebugEnabled="auto" >

    <resourceSet name="siteCss" type="css" minifierRef="yui">
      <resource path="~/Content/main.css" />
      <resource path="~/Content/css/superfish.css" />
      <resource path="~/Content/css/superfish-rtl.css" />
      <resource path="~/Content/prettyPhoto/css/prettyPhoto.css" />
    </resourceSet>

    <resourceSet name="siteJs" type="js">
      <resource path="~/Content/js/jquery-1.4.2.min.js" />
      <resource path="~/Content/js/superfish.js" />
      <resource path="~/Content/prettyPhoto/js/jquery.prettyPhoto.js" />
    </resourceSet>

    <resourceSet name="adminCss" type="css" minifierRef="yui">
      <resource path="~/Content/Site.css" />
      <resource path="~/Content/CKEditor/_samples/sample.css" />
      <resource path="~/Content/eggplantTheme/jquery-ui-1.8.2.custom.css" />
      <resource path="~/Content/TreeView/jquery.treeview.css" />     
    </resourceSet>

    <resourceSet name="adminJs" type="js">
      <resource path="~/Content/js/jquery-1.4.2.min.js" />
      <resource path="~/Content/js/jquery-ui-1.8.2.custom.min.js" />
      <resource path="~/Scripts/general2.js" />
      <resource path="~/Content/CKEditor/ckeditor.js" />
      <resource path="~/Content/CKEditor/_samples/sample.js" />
      <resource path="~/Content/CKEditor/lang/_languages.js" />
      <resource path="~/Content/TreeView/jquery.treeview.min.js" />
    </resourceSet>

  </resourceSets>
</bres>

hi i've just added Combres to my ASP.NET MVC project and it bines the CSS files into one CSS and the JS files into one JS file smoothly, but for some reason it does that without minification.

any idea why ? (note- i just added the yui minifier. it doesnt press my file with it our with it...) here's my bres.xml :

<?xml version="1.0" encoding="utf-8" ?>
<bres xmlns='urn:bres'>
  <cssMinifiers>
    <minifier name="yui" type="Combres.Minifiers.YuiCssMinifier, Combres">
      <param name="CssCompressionType" type="string" value="StockYuiCompressor" />
      <param name="ColumnWidth" type="int" value="-1" />
    </minifier>
  </cssMinifiers>
  <resourceSets url="~/bres.axd" defaultDuration="30"
                                defaultVersion="auto"
                                defaultDebugEnabled="auto" >

    <resourceSet name="siteCss" type="css" minifierRef="yui">
      <resource path="~/Content/main.css" />
      <resource path="~/Content/css/superfish.css" />
      <resource path="~/Content/css/superfish-rtl.css" />
      <resource path="~/Content/prettyPhoto/css/prettyPhoto.css" />
    </resourceSet>

    <resourceSet name="siteJs" type="js">
      <resource path="~/Content/js/jquery-1.4.2.min.js" />
      <resource path="~/Content/js/superfish.js" />
      <resource path="~/Content/prettyPhoto/js/jquery.prettyPhoto.js" />
    </resourceSet>

    <resourceSet name="adminCss" type="css" minifierRef="yui">
      <resource path="~/Content/Site.css" />
      <resource path="~/Content/CKEditor/_samples/sample.css" />
      <resource path="~/Content/eggplantTheme/jquery-ui-1.8.2.custom.css" />
      <resource path="~/Content/TreeView/jquery.treeview.css" />     
    </resourceSet>

    <resourceSet name="adminJs" type="js">
      <resource path="~/Content/js/jquery-1.4.2.min.js" />
      <resource path="~/Content/js/jquery-ui-1.8.2.custom.min.js" />
      <resource path="~/Scripts/general2.js" />
      <resource path="~/Content/CKEditor/ckeditor.js" />
      <resource path="~/Content/CKEditor/_samples/sample.js" />
      <resource path="~/Content/CKEditor/lang/_languages.js" />
      <resource path="~/Content/TreeView/jquery.treeview.min.js" />
    </resourceSet>

  </resourceSets>
</bres>
Share Improve this question edited Nov 25, 2010 at 13:22 danfromisrael asked Nov 24, 2010 at 19:09 danfromisraeldanfromisrael 3,1124 gold badges33 silver badges42 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 8

Since you set defaultDebugEnabled to auto, debug setting in web.config will be picked up. If you are in debug mode (as specified in web.config), there will be no minification. Either change defaultDebugEnabled to false or switch to release mode in your ASP.NET app.

You can refer to the section Debugging Support in this article for more information.

You have to enable minification: See this article: http://www.codeproject./KB/aspnet/bres2.aspx

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744937787a4602133.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信