I am using the Microsoft Ajax Minifier to minify my javascript files. In the manifest, I would like to specify that all js files in a source folder should be minified into a different output folder. The original filename should be used as the output filename plus a variable should be appended. I would like to do something like the manifest below where the output uses a * wildcard and the variable is a version number of 4.60.
<?xml version="1.0" encoding="utf-8"?>
$(version) = "-4.60"
<root>
<output path="..\Scripts\Pages\*$(version)" type="js">
<input path="Scripts\PageSource\" type="js" />
</output>
</root>
Using a * in the output setting throws a build error but maybe there is a different wildcard character? There are a lot of output and input settings, which is why I'd like to specify a version number once and reuse it.
Could any of the settings in the targets file (see below) be used for this purpose? I could not find any examples that show what the ProjectDefaultSwitches and Configuration settings do.
<!-- target to build all ajaxmin manifest files in the project -->
<Target Name="BuildAjaxMinManifests" AfterTargets="Build">
<Message Text="Processing AjaxMin Manifests" Importance="high" />
<CreateItem Include="@(None)" Condition="'%(Extension)'=='.ajaxmin'">
<Output TaskParameter="Include" ItemName="AjaxMinManifests"/>
</CreateItem>
<AjaxMinManifestTask ProjectDefaultSwitches="-define:$(DefineConstants))"
Configuration="$(Configuration)"
TreatWarningsAsErrors="false"
InputFolder="$(ProjectDir)"
OutputFolder="$(ProjectDir)Content\"
Manifests="@(AjaxMinManifests)" />
</Target>
Is this possible?