Quantcast
Channel: ajaxmin Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 683

Commented Unassigned: Combine only and preserve regular comments [19894]

$
0
0
Installed Ajaxmin 4.93, first time using AjaxMinManifestTask. Seems like all regular comments in my manifest input modules are stripped. This destroys capability of using ///#DEBUG & ///#ENDDEBUG javascript blocks, resulting in debug code ALWAYS injected into output javascript. Tried many different switches but no luck. I was expecting -echo -pretty:3 to just combine all "as is" including comments. Here is sample manifest:
```
<?xml version="1.0" encoding="utf-8" ?>
<!--====================================================================
target to build all ajaxmin manifest files in the project
REFER:http://ajaxmin.codeplex.com/wikipage?title=ManifestTask
REFER:http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches
====================================================================-->
<root>
<arguments>-debug:true –global:jQuery,$,OSS,store -strict:true -braces:source -echo -pretty:3 -clobber</arguments>
<output path="Scripts\1.0.0\pgXPMowbotNavDesigner.src.js">
<input path="Scripts\dev.closurebegin.module.savejs"/>
<input path="Scripts\1.0.0\pgXPMowbotNavShared.module.js"/>
<input path="Scripts\1.0.0\oss.widget_ruler.module.js"/>
<input path="Scripts\1.0.0\pgXPMowbotNavDesigner.module.js"/>
<input path="Scripts\dev.closureend.module.savejs"/>
</output>
<output path="Scripts\1.0.0\pgXPMowbotNav.src.js">
<input path="Scripts\dev.closurebegin.module.savejs"/>
<input path="Scripts\1.0.0\pgXPMowbotNavShared.module.js"/>
<input path="Scripts\1.0.0\oss.widget_segmentdisplay.module.js"/>
<input path="Scripts\1.0.0\oss.widget_compass.module.js"/>
<input path="Scripts\1.0.0\oss.widget_ruler.module.js"/>
<input path="Scripts\1.0.0\pgXPMowbotNav.module.js"/>
<input path="Scripts\dev.closureend.module.savejs"/>
</output>
</root>
```
Comments: ** Comment from web user: ronlo **

Okay, so 4.95 will have a new task you can import from the AjaxMinTask.dll in your msbuild scripts:
```
<UsingTask TaskName="AjaxMinBundleTask" AssemblyFile="AjaxMinTask.dll" />
```
This task has essentially the same properties as the AjaxMinManifestTask, with Manifests being the most important one. When you execute this task, it will iterate over the manifests listed in the Manifests property, and then "bundle" all the input files into their corresponding output files. It won't _process_ the input files at all -- it will simply concatenate them all into one or more output files suitable for processing with AjaxMin later. There will be "///#SOURCE" comments inserted before each file source so that any errors or warnings found in the bundled file(s) can be properly mapped back to the original source files.

An example msbuild script for using this might be:
```
<UsingTask TaskName="AjaxMinBundleTask" AssemblyFile="AjaxMinTask.dll" />
<Target Name="BundleAjaxMinManifests" AfterTargets="Build">
<Message Text="Bundling AjaxMin Manifests" Importance="high" />
<CreateItem Include="@(None)" Condition="'%(Extension)'=='.ajaxmin'">
<Output TaskParameter="Include" ItemName="AjaxMinManifests"/>
</CreateItem>
<AjaxMinBundleTask OutputFolder="$(ProjectDir)Content\" Manifests="@(AjaxMinManifests)" />
</Target>
```


Viewing all articles
Browse latest Browse all 683


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>