concat和uglify和minify有什么区别? [英] What's the difference between concat and uglify and minify?
问题描述
concat,uglify和grunt中的minify任务有什么区别?我为我的网站的所有javascript任务设置了一个uglify任务,它似乎既缩小又连接它们。 Grunt的网站对如何配置每个任务有很好的描述,但似乎并没有解释每个任务实际上做了什么。 解决方案
ul> 串联只是将所有静态文件附加到一个大文件。 缩小只是删除不需要的空白和冗余/可选标记,如卷曲和分号,可以通过使用linter来反转
What's the difference between concat, uglify, and minify tasks in grunt? I set up an uglify task for all of my site's javascript tasks, and it seemed to both minify and concatenate them. Grunt's site has a great description for how to configure each task, but it doesn't seem to explain what each task actually does.
Concatenation is just appending all of the static files into one large file.
Minification is just removing unnecesary whitespace and redundant / optional tokens like curlys and semicolons, and can be reversed by using a linter.
Uglification is the act of transforming the code into an "unreadable" form, that is, renaming variables/functions to hide the original intent... It is, also, irreversable.
这篇关于concat和uglify和minify有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!