I m using ajaxmin to minify all my JS files. Everything works perfectly but i have little problem with the way the output files are generated.
Currently what happenes is the JS files are minified next to its path. e.g If the original path is includes/js/test.js then it is minified at includes/js/test.min.js.
I want my all js files to minify at different location then the original location. e.g. My all js files are under includes/js/JSFILESHERE and i wanted these js files to be minified at includes/minifiedjs/MINIFIEDJSFILESHERE.
i m using the below code.
<Import Project="$(MSBuildExtensionsPath)\Microsoft\MicrosoftAjax\AjaxMin.tasks" />
<Target Name="AfterBuild">
<ItemGroup>
<JS Include="\js\*.js" Exclude="**\*.min.js;" />
</ItemGroup>
<AjaxMin JsSourceFiles="@(JS)" JsSourceExtensionPattern="\js\.js$" JsTargetExtension=".min.js"/>
</Target>
Please help.
Apologies for replying bit late to this question.
Here is the solution I used for my project -
Here am first copying the files to a destination folder(recursively) and then applying the Minification on them. I needed source map files so thats why I kept my original files but if you dont need source maps then you could delete source files after minification is complete.