문제

I'm looking for a solution to combine several javascript files into as few as possible. I currently have many files from external sources like twitter, facebook, google+ etc.. as well as few of my own.

Is it possible to somehow automatically combine this into one, or as few as possible files?

If not all of them than combine external and internal files separately.

도움이 되었습니까?

해결책

If downloading the external files and placing them in your server is an option, the you can use a tool like:

To compile the js (and usually minify it) into one big file.

That being said I recommend that you keep the external files in the external cdn you load them, because they probably cache them and it'll be faster.

Keep in mind that having only one file isn't always the best way to go (it depends on things like size of the resulting file, if you really have to load it, etc).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top