Whats the diff between cdnjs vs npmjs

送分小仙女□ 提交于 2019-12-07 17:38:39

问题


What is the difference between cdnjs vs npmjs? Im new to Javascript and programming in general so this probably is a real newb question and there's probably a real big difference.

But what is it, the difference? And is npm a type of CDN (content delivery network)?


回答1:


npmjs(Node Package Manager) is repository consisting node modules/packages. you can search and download node modules from there.

cdnjs is Content Delivery Network for JavaScript library files. You can add reference of JavaScript libraries from cdnjs without requiring them to be on your server.




回答2:


npmjs == node js deps // server side

CDN == your browser deps // client side

in simple words



来源:https://stackoverflow.com/questions/31569064/whats-the-diff-between-cdnjs-vs-npmjs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!