WebGrease build override file

The WebGrease build override file is a local file on a developer machine that can be used to reduce the amount of files that WebGrease builds during development and debugging.

To enable the WebGrease build override file

  1. Set the OverrideFile build task parameter as follows: OverrideFile="$( WebGreaseOverrideFile)
  2. In your project file, add the following element and value in your propertygroup element: <WebGreaseOverrideFile Condition="'$(WebGreaseOverrideFile)' == ''">$(SolutionDir)\webgrease.overrides.xml</WebGreaseOverrideFile>
  3. Add a file named webgrease.overrides.xml to your project folder. For example content of this file, see Example WebGrease build override file.

Example WebGrease build override file

This example has all overrides commented out. You can copy this example code to your WebGrease build override file and then uncomment the items you want to exclude from a build.

If you want to completely disable WebGrease, use: <Overrides SkipAll="true"/>

<?xml version="1.0" encoding="utf-8"?>
<!--
This file allows you to temporarily reduce the amount of files built while developing and debugging.
- All elements can take a list of strings separated by a semi-colon.
- The items will be matched using case insensitive string contain, except for OutputExtensions which uses case insensitive endswith.
- When excluding device groups using Outputs make sure they start with a dot.
- Valid values for OutputExtensions are any file extension, but only usefull ones are: css & js (scss also ends in css)

This file should never be checked into TFS and should be a local developer item only.

If you are not working on Javascript or Stylesheets at all you can use 
<Overrides SkipAll="true"/> 
to skip webgrease as a whole.
-->
<Overrides>
  <!-- Only css for generic-generic, Resolution1x and tmx pc -->
  <!--
  <Locales>generic</Locales>
  <Themes>1X</Themes>
  <Outputs>.tmx.pc.ms</Outputs>
  <OutputExtensions>css</OutputExtensions>
   -->
  
  <!-- Only en-* and classic.* -->
  <!-- 
  <Locales>en</Locales>
  <Outputs>.classic</Outputs>
  -->
  
  <!-- Only en-* and classic.* and resolution 2x (iphone resolution) -->
  <!-- 
  <Locales>en</Locales>
  <Themes>2x</Themes>
  <Outputs>.tmx.mobile.webkit.ios</Outputs>
  -->
  
  <!-- Only ja-jp and classic.* and downlevel.* -->
  <!-- 
  <Locales>ja=jp</Locales>
  <Outputs>.clasic;.downlevel</Outputs>
  -->
  
  <!-- Only articlePage javascript -->
  <!-- 
  <Outputs>articlePage</Outputs>
  <OutputExtensions>js</OutputExtensions>
  -->
</Overrides>

See Also

Last edited Sep 4, 2013 at 7:07 PM by JeffRob, version 1

Comments

No comments yet.