HTML / CSS / JS构建工具 [英] HTML/CSS/JS build tool
问题描述
我有一个项目,该项目包含了很多静态HTML和JS文件的。我需要一个构建工具,可以连接和它们最小化。
I have a project which consist of a lot of static HTML and js files. I need a build tool that can concatenate and minify them.
我看到这个伟大的的截屏,说明如何使用Ant和YUI做到这一点。我唯一缺少的是在创建缩小的版本之后,我怎么能取代在HTML中JS / CSS文件的引用,所以它会引用新版本缩小的?
I saw this great screencast that explains how to do it with ant and YUI. The only thing I'm missing is after the minified version is created , how can i replace references to the JS/CSS files in the HTML, so it will reference the new minified version?
是否有这更好/更容易工具(不是GPL / LGPL许可证)?
Is there a better/easier tool for this (not GPL/LGPL license)?
推荐答案
咕噜是pretty不错,并且支持最这些事情。 这个插件将重新写你的CSS链接标签,但通常(和JS)你只是写链接/ script标签笔直指向缩小的版本,反正,不断有它建立自己的文件。
Grunt is pretty good, and supports most of those things. This plugin will re-write your CSS link tags, though normally (and for JS) you'd just write the link/script tags to point straight to the minified version anyway, and continually have it build your files.
这篇关于HTML / CSS / JS构建工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!