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 **

Hmmm... sounds like I've missed something in the documentation there; apologies.

Oh, okay -- so then you don't want the -pponly switch, because that will _execute_ the preprocessor directives and not preserve them. Well, if you were using the EXE I'd say you need to use the -echo switch, but as you've already noticed, that's not supported in the manifest task.

So out of curiosity, are you using AjaxMin to simply bundle the files so that you can get any errors/warnings in the code at bundle time? If so, then I think supporting -echo in the manifest files will _almost_ do the trick for you, but not quite. The problem that will still exist will be that in order to parse the code to find any errors, the preprocessor directives will be executed, and you'd end up not parsing some blocks of code at all, which means it wouldn't report any errors in those portions of code. You could get an "everything's okay" message from that part, only to fail later on when you really do minify the code and the blocks that were skipped the first time get parsed the second time.

It sounds like you just need a pure bundle-this-code-and-don't-process-it-at-all step, in which case using AjaxMin is like using a sledgehammer to put a push-pin into a corkboard. Maybe I'll just have to add a bundle task to the DLL which takes a manifest and bundles up the input files as-is to the output files.

Just out of curiosity, have you looked at WebGrease by any chance? I believe they already have a pure bundle option in their tool, and they use AjaxMin under the covers for their JavaScript processing.


Viewing all articles
Browse latest Browse all 683

Trending Articles



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