Microsoft Ajax Minifier-TFS 2010工作流-TFS构建中的AjaxMin [英] Microsoft Ajax Minifier - TFS 2010 Workflow - AjaxMin in the TFS Build

查看:86
本文介绍了Microsoft Ajax Minifier-TFS 2010工作流-TFS构建中的AjaxMin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

位于 http://ajaxmin.codeplex.com/的AjaxMin项目非常好并且非常有用.

The AjaxMin project at http://ajaxmin.codeplex.com/ is great and very useful.

我以前使用的是AjaxMin的代码选项,在该选项中,我将手动扫描目录中的所有JS和CSS文件,并缩小内容,然后用缩小的内容重写原始文件.

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.

此代码将在自定义的"BuildConfigurator"中运行,该"BuildConfigurator"仅用于在构建上运行以使其准备好进行部署.

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.

此后,我们决定放弃BuildConfigurator,并使用TFS2010进行所有构建.我已经开始使用TFS Build Workflows,现在需要缩小我的所有JS/CSS文件(相同的文件名).

We have since made the decision to get rid of BuildConfigurator and use TFS2010 to do all the builds. I have started using the TFS Build Workflows and I need to now minify all my JS/CSS files (same filename).

如何在TFS生成工作流中执行此操作?应该可行,对吧?

How can I do this in the TFS Build Workflow? It should be doable, right?

我在 http://ajaxmin.codeplex上看到了有关如何将其添加到项目定义中的文档. .com/wikipage?title = AjaxMinTask ,但这似乎是在项目级别.我希望能够在整个解决方案/构建中做到这一点,而缩小操作只能通过TFS构建来完成,而不是在任何开发人员机器上进行本地构建.

I saw documentation on how to add it to the project definition at http://ajaxmin.codeplex.com/wikipage?title=AjaxMinTask but that seems to be at the project level. I want to be able to do it for the whole solution/build, where the minifying would only be done with a TFS Build, as opposed to a local build on any devs machine.

任何帮助将不胜感激.谢谢.

Any help would be greatly appreciated. Thank you.

推荐答案

我最终创建了一个名为AjaxMinify的自定义构建活动代码,该代码将目录路径作为输入(在构建工作流中设置),然后将其最小化.目录/子目录中的所有文件.我只是在该活动的代码项目中引用了AjaxMin.dll.然后,只需将AjaxMinify活动添加到所需的构建工作流程中,然后便可以正常工作了!谢谢您的回答.

I ended up creating a custom build activity code that i called AjaxMinify that took in a directory path as input (set in the build workflow), and it then minified all files in the directory/sub-directories. I just referenced the AjaxMin.dll in the code project for the activity. Then just add the AjaxMinify activity in the build workflows that you want and presto it works! Thanks for the answers tho.

这篇关于Microsoft Ajax Minifier-TFS 2010工作流-TFS构建中的AjaxMin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆