microsoft-ajax-minifier

How can we include the files created by ajaxmin in the msdeploy package created by MSBuild

时间秒杀一切 提交于 2019-12-29 08:40:47
问题 We use ajaxmin to create .min.js files from all our .js files. We have edited the .csproj file of the project and added following: <Import Project="$(MSBuildExtensionsPath32)\Microsoft\MicrosoftAjax\ajaxmin.tasks" /> <Target Name="AfterBuild"> <ItemGroup> <JS Include="**\*.js" Exclude="**\*.min.js" /> </ItemGroup> <AjaxMin JsSourceFiles="@(JS)" JsSourceExtensionPattern="\.js$" JsTargetExtension=".min.js" /> </Target> This works great when we build the site on our workstation and the .min.js

Microsoft Ajax Minifier - TFS 2010 Workflow - AjaxMin in the TFS Build

半城伤御伤魂 提交于 2019-12-25 09:25:02
问题 The AjaxMin project at http://ajaxmin.codeplex.com/ is great and very useful. What I have previously used is the code option of AjaxMin where I would manually scan a directory for all JS and CSS files, and minify the contents, then rewrite the original file with the minified content. This code would be run in a custom "BuildConfigurator" that was created just for the purpose of running on builds to get them ready for deployment. We have since made the decision to get rid of BuildConfigurator

How to instruct Ajax Minifier to remove console.log from javascript

匆匆过客 提交于 2019-12-21 13:10:22
问题 I have lines in my js files like this console.log('FunctionName()'); The default Ajax Minifier settings do not remove these lines from the .min.js output. I noticed in this discussion a conversation about Kill switches. Looking at the Kill Switch page here. I noticed there is this switch: /// <summary> /// remove "debug" statements /// </summary> StripDebugStatements = 0x0000000000800000, I am not using the command line, I am referencing the DLL. This is how I have implemented it.

Setting Visual Studio to automatically minifying using Ajax Minifier

拈花ヽ惹草 提交于 2019-12-13 05:20:26
问题 I use VS 2010 I would like at the pressing of Build Button have all CSS and .JS files minified. Following this article all is working great for JS... adding some extra code for the CSS (pasted below) I'm not able to Minifying the CSS. What I'm doing wrong here? Thanks for your time. <Import Project="$(MSBuildExtensionsPath)\Microsoft\MicrosoftAjax\ajaxmin.tasks" /> <Target Name="AfterBuild"> <ItemGroup> <JS Include="**\*.js" Exclude="**\*.min.js;Scripts\*.js" /> <JS Include="**\*.css" Exclude

Microsoft Ajax Minifier Renames My Function Names

与世无争的帅哥 提交于 2019-12-12 12:33:11
问题 I am using a jQuery plugin and running it through the Microsoft Ajax Minifier. My scripts work well for me, but now I am running into an issue with this plugin. The issue is that the plugin calls a function by its name using a string: var s = (getCachedSortType(table.config.parsers, c) == "text") ? ((order == 0) ? "sortText" : "sortTextDesc") : ((order == 0) ? "sortNumeric" : "sortNumericDesc"); Note the "sortNumeric" and "sortNumericDesc". This calls these functions: function sortNumeric(a,

Why Microsoft Ajax Minifier doesn't generate mini file with Team build 2010?

笑着哭i 提交于 2019-12-11 05:25:19
问题 I just used the wonderful tool Microsoft Ajax Minifier and it's working very well when I build my MVC application on my machine but when I check-in in source control and started build by the Team Build 2010 it doesn't create the min files, for sure I can't put the mini files inside the source control as the recommendation from the Microsoft Ajax Minifier because it's like the dll it's generated every time you build your application so no need to put it in source control beside it can't be

Reliable and convenient JavaScript minifier [closed]

删除回忆录丶 提交于 2019-12-10 17:28:44
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I occasionally write JavaScript code. I am interested in minifying it for better performance, but I don't plan to spend to much time

Unable to run Ajax Minifier as post-build in Visual Studio

两盒软妹~` 提交于 2019-12-10 10:59:17
问题 I've set up my post build config as demonstrated at http://www.asp.net/ajaxlibrary/ajaxminquickstart.ashx I'm getting the following error though: The "JsSourceFiles" parameter is not supported by the "AjaxMin" task. Verify the parameter exists on the task, and it is a settable public instance property. My configuration settings...... <Import Project="$(MSBuildExtensionsPath)\Microsoft\MicrosoftAjax\ajaxmin.tasks" /> <Target Name="AfterBuild"> <ItemGroup> <JS Include="**\*.js" Exclude="**\*

How to instruct Ajax Minifier to remove console.log from javascript

别等时光非礼了梦想. 提交于 2019-12-04 06:26:48
I have lines in my js files like this console.log('FunctionName()'); The default Ajax Minifier settings do not remove these lines from the .min.js output. I noticed in this discussion a conversation about Kill switches . Looking at the Kill Switch page here . I noticed there is this switch: /// <summary> /// remove "debug" statements /// </summary> StripDebugStatements = 0x0000000000800000, I am not using the command line, I am referencing the DLL. This is how I have implemented it. CodeSettings jsSettings = new CodeSettings() { KillSwitch = 800000, }; and then later the actual minifier method

Using the Microsoft Ajax Minifier with Web Setup project & Source Control

旧巷老猫 提交于 2019-12-01 10:48:56
I've just started investigating the Microsoft Ajax Minifer 4.0 for use with a Visual Studio 2008 Web Application I work on. It's proven easy enough to hook it into the .csproj file so it produced .min.js files for all scripts, however I'm stumped as to how to integrate this with the Web Setup project & Source Control. Essentially what I want to do is have the resultant .min.js files included in the Web Setup project without having them included in Source Control because: Having to check them out prior to the build being executing is a pain (the minifier cannot modify them if they're not