JS - 一个巨大的文件或许多小文件? - 在哪里划线? [英] JS - one huge file or many small files? - where to draw a line?
本文介绍了JS - 一个巨大的文件或许多小文件? - 在哪里划线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
对于JS文件应该有多大(大小),是否有一个很好的经验法则 - 如果它比这大得多,最好将它分成更小的文件?
Is there a good rule of thumb as to how big (in size) a JS file should be - that if it grows bigger than this it's good idea to split it into smaller files?
推荐答案
与任何其他语言(从不超过几百行)相同的大小,以及运行时的concat和minify(使用Closure编译器或Yahoo库或什么是我们做的。
The same size as any other languages (never more than a few hundred lines), and the concat and minify at runtime (using the Closure compiler or the Yahoo libs or whatnot) is what we do.
这篇关于JS - 一个巨大的文件或许多小文件? - 在哪里划线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文