npm 3和Bower有什么区别? [英] What is the difference between npm 3 vs Bower?

查看:93
本文介绍了npm 3和Bower有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

npm 3具有平坦的(-ish)依赖结构,我们将来使用Bower还是在发布时仅使用npm 3?

With npm 3 coming with a flat(-ish) dependency structure, do we use Bower in future or just npm 3 when its released ?


npm是最常用于管理Node.js模块的工具,但是当与Browserify和/或$ npm重复数据删除技术结合使用时,它也适用于前端。

npm is most commonly used for managing Node.js modules, but it works for the front-end too when combined with Browserify and/or $ npm dedupe.

Bower是专门为前端创建的,并在考虑到
的情况下进行了优化最大的区别是npm确实嵌套了依赖项
树(大小沉重),而Bower需要一个平坦的依赖项树(使
成为用户依赖项解析的负担)

Bower is created solely for the front-end and is optimized with that in mind. The biggest difference is that npm does nested dependency tree (size heavy) while Bower requires a flat dependency tree (puts the burden of dependency resolution on the user)

将凉亭合并到npm

npm3

npm-and -front-end-packaging

推荐答案

npm 3加上 browserify webpack 是现在的方法。

npm 3 coupled with browserify or webpack is the way to go now. Multiplying package manager in your project make your workflow harder.

立即使用以下命令安装npm 3:

Install npm 3 today with:

npm install -g npm@latest

这篇关于npm 3和Bower有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆