上周我和一个朋友共进午餐,他自称 yarn 有多棒,而且它比 npm 快得多。作为一个花太多时间看 npm 进度条的人,我只是使用我已经拥有的项目进行比较。
https://yarnpkg.com/en/compare
在所有情况下,我都首先删除了 node_modules 文件夹。我认为 yarn 需要一个缓存的机会,所以我的第一次运行yarn install
大约需要 7m 10s。第二次运行(我确实看到抓取几乎没有时间)花了 5m 20s。
跳回到已经有这些依赖项缓存的 npm,运行几乎正好花了两分钟npm install
。所以我的结果与纱线自己的比较页面完全相反。
我如何比较这些是否存在严重缺陷?
以下是我的测试中安装的依赖项:
"angular": "^1.5.8",
"angular-animate": "^1.5.8",
"angular-i18n": "^1.5.8",
"angular-moment": "^1.0.0",
"babel-core": "^6.3.26",
"babel-loader": "^6.2.0",
"babel-plugin-transform-es2015-block-scoping": "^6.10.1",
"babel-preset-es2015": "^6.3.13",
"babel-preset-react": "^6.3.13",
"bootstrap-datetimepicker": "0.0.7",
"clean-webpack-plugin": "^0.1.14",
"css-loader": "^0.23.1",
"deep-freeze": "0.0.1",
"del": "^1.1.1",
"delorean": "^0.9.7",
"es6-promise": "^3.0.2",
"highcharts": "^5.0.0",
"immutable": "^3.7.6",
"jquery": "^2.1.4",
"json-loader": "^0.5.4",
"moment": "^2.10.6",
"ng-quick-grid": "latest",
"ngmap": "^1.17.6",
"node-sass": "^3.8.0",
"object-assign": "^1.0.0",
"raw-loader": "^0.5.1",
"react": "^0.14.5",
"react-addons-create-fragment": "^0.14.7",
"react-bootstrap": "^0.28.1",
"react-bootstrap-datetimepicker": "0.0.22",
"react-copy-to-clipboard": "^3.0.4",
"react-datepicker": "^0.17.0",
"react-dom": "^0.14.5",
"react-paginate": "^0.5.4",
"react-redux": "^4.0.6",
"react-slick": "^0.9.3",
"redux": "^3.0.5",
"redux-batched-actions": "^0.1.1",
"redux-thunk": "^1.0.3",
"resolve-url-loader": "^1.6.0",
"sass-loader": "^4.0.0",
"style-loader": "^0.13.0",
"webpack": "^1.12.9",
"webpack-manifest-plugin": "^1.1.0",
"webpack-notifier": "^1.2.1"