开发者

Legality of minifying plugins javascript

I am using several plugins for a site. What is the legallity of minifiying all开发者_开发问答 of these plugins into one file?

Is this is allowed or do I have to keep them seperate? I understand there are multiple licenses but just as a general practice, is this considered ok?


It depends of the plugins you are using. You need to carefully read the "license" or "legal" section of the site of every script you are using.


Well, simplicity says to keep them separate, and just load each one on the pages. This has the added benefit of allowing you to only load the ones needed on a given page. Also keeps things neater, I find a lot of small files is much more manageable then one large file.

If you really want to merge them, give each one an obvious start and end, give all credit where credit is due, and read the individual plugin's licenses (making sure it doesn't have something about this case).


I can't imagine anything bad ever happening with any license as long as you include the license and possibly a link to the original, e.g.:

/* MIT License for some plugin
   Author: Bob */
function(){ minified code... }

/* Another plugin's license */
function(){ minified code... }

Also, even if the license prohibits modification to the code, I would strongly argue that minifying is not modification (as long as you link to non-minified code).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜