jac*_*hai 14 javascript node.js npm
npm dedupe可以展平文件夹结构.但是,在这之前.我希望看到一个重复包的列表,以便我知道是否继续前进.有这样的功能吗?如果没有,是否有某种脚本可以帮助我实现这一目标?
mzu*_*lch 19
试试这个:
npm ls --parseable | xargs -L1 sh -c 'basename $1' dummy | sort | uniq -c | grep -v "^ *1 " | sort -rn
Run Code Online (Sandbox Code Playgroud)
这里的管道是:
尝试find-duplicate-dependencies。除了版本之外,它还向您显示了重复项的简化路径:
$ find-duplicate-dependencies
This package has the following duplicate dependencies:
regenerator-runtime :
[ { name: 'regenerator-runtime',
version: '0.11.1',
from: undefined,
path: 'project/react-select/emotion/babel-plugin-emotion/babel-core/babel-runtime' },
{ name: 'regenerator-runtime',
version: '0.12.1',
from: undefined,
path: 'project/recompose/@babel/runtime' } ]
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2543 次 |
| 最近记录: |