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

Commented Issue: AjaxMinTask not working as expected [19459]

$
0
0
I am using AjaxMinTask and ajaxmin files from a .NET project in VS2010 to concatenate and compress both css and js files.

1. First problem is that the js code is broken once minified. I am using 14 files as input, JQuery, Knockout, YUI, etc., as well as my own code. One thing I am doing though is that I am using the already minified versions of the vendors' files listed above. Not sure if this is allowed but it would be handy (if not, why?). I have tried to use the following switches to no evail:

–global:YUI,JQuery,$,ko -evals:safeall -fnames:keep<

I am doing many Ajax calls and I wonder if this is not what gets broken (I saw there was a problem with that; not sure if it's been fixed).

2. Another problem is that the output files do not get overwritten with every build even though I use the "-clobber:true" switch. If not resolved, this problem would be definitely a show stopper (i.e. find another solution) as we do automatic builds on a build server and need to be sure the files will be renewed every time.

Thanks, Yves
Comments: ** Comment from web user: ycourbier **

I am using AjaxMinTask.dll with Manifest files. See:
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="AjaxMinManifestTask" AssemblyFile="AjaxMinTask.dll" />

<!-- 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)Bundling\"
OutputFolder="$(ProjectDir)Bundling\"
Manifests="@(AjaxMinManifests)" />
</Target>
</Project>
And my ajaxmin file is:
<root>
<output path="DashboardUcm.bundled.min.js">
<!-- -clobber switch overwrites the file if it exists -->
<arguments>-clobber:true –global:YUI,JQuery,$,ko -evals:safeall -silent -fnames:keep</arguments>
<input path="..\Scripts\plugins.js"/>
<input path="..\Scripts\main.js"/>
<input path="..\Scripts\vendor\jquery-1.8.3.min.js"/>
<input path="..\Scripts\vendor\jquery-ui-1.9.2.custom.min.js"/>
<input path="..\Scripts\vendor\jquery.validate.min.js"/>
<input path="..\Scripts\vendor\knockout-2.2.1.js"/>
<input path="..\Scripts\vendor\knockout.mapping.js"/>
<input path="..\Scripts\vendor\jquery.flip.min.js"/>
<input path="..\Scripts\vendor\yui-3.8.1.min.js"/>
<input path="..\Scripts\vendor\yui-3.8.1.combo.min.js"/>
<input path="..\Scripts\vendor\raphael.2.1.0.min.js"/>
<input path="..\Scripts\vendor\justgage.1.0.1.min.js"/>
<input path="..\Scripts\vendor\jquery.dataTables.min.js"/>
<input path="..\Scripts\DashboardUcm.js"/>
</output>
</root>

The javascript error I get is :
SCRIPT5007: Object expected
DashboardUcm.bundled.min.js, line 12 character 20627

which is at:
function(n){jQuery.event.special.focusin||jQuery.event.special.focusout||!document.addEventListener||n.each({focus:"focusin",blur:"focusout"},function(t,i){function r(t){return t=n.event.fix(t),t.type=i,n.event.handle.call(this,t)}

Sorry, I couldn't send this to you earlier on.

Note I am using the "min" version of third party js (JQuery, YUI, KO). Not sure if this is allowed.

What's puzzling is that the switches don't seem to work. Is there another option to just get rid of spaces and CR/LF characters?
Thanks


Viewing all articles
Browse latest Browse all 683

Latest Images

Trending Articles



Latest Images

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