查看本地NPM包我得到一个特定NPM包一些node-gyp
警告,在这种情况下,这个包是“获取光标位置”。我想知道我的本地node_modules目录中的哪些软件包取决于此软件包。 (这可能是不是很容易做到)。依赖于包X
如果我运行:
$ npm view get-cursor-position
我得到:
{ name: 'get-cursor-position',
description: 'Get the cursor\'s current position in your terminal.',
'dist-tags': { latest: '1.0.3' },
versions:
[ '0.0.1',
'0.0.2',
'0.0.4',
'0.0.5',
'1.0.0',
'1.0.1',
'1.0.2',
'1.0.3' ],
maintainers: [ 'bubkoo <[email protected]>' ],
time:
{ modified: '2016-11-01T02:36:07.728Z',
created: '2016-03-05T03:42:31.517Z',
'0.0.1': '2016-03-05T03:42:31.517Z',
'0.0.2': '2016-03-07T00:35:36.627Z',
'0.0.4': '2016-03-10T07:21:21.364Z',
'0.0.5': '2016-03-10T07:25:04.846Z',
'1.0.0': '2016-04-16T08:11:34.546Z',
'1.0.1': '2016-06-03T15:57:55.767Z',
'1.0.2': '2016-06-13T14:19:32.966Z',
'1.0.3': '2016-11-01T02:36:07.728Z' },
homepage: 'https://github.com/bubkoo/get-cursor-position',
keywords: [ 'terminal', 'console', 'cursor', 'position', 'ansi', 'escape' ],
repository:
{ type: 'git',
url: 'git+https://github.com/bubkoo/get-cursor-position.git' },
author: 'bubkoo <[email protected]>',
bugs: { url: 'https://github.com/bubkoo/get-cursor-position/issues' },
license: 'MIT',
readmeFilename: 'README.md',
version: '1.0.3',
main: 'index.js',
scripts:
{ test: 'echo "Error: no test specified" && exit 1',
install: 'node-gyp rebuild' },
gypfile: true,
gitHead: '56d403bb0e554532d17c403c47421ce8d2db2dec',
dist:
{ shasum: '0e41d60343b705836a528d69a5e099e2c5108d63',
tarball: 'https://registry.npmjs.org/get-cursor-position/-/get-cursor-position-1.0.3.tgz' },
directories: {} }
我相信故宫视图只会查找远程数据包,我很乐意用在NPM汇总数据显示所有依赖于get-cursor-position
的软件包,并且我可以在我的结尾做一些手动工作以与本地软件包进行比较。
我也试过:
npm ls foo
在我的情况,我想:
npm ls suman-events
,它似乎并没有拿起我的预期是回暖。我希望它能在我的案例中找到“suman-example-reporter”=>
正如您在下图中看到的,“suman-example-reporter”是我项目中的一个直接依赖项(它在的package.json)和苏曼 - 例如,记者取决于“苏曼的事件”(和“苏曼事件”是的package.json为好,因为它也是我的项目的直接依赖关系)。
任何人都知道如何做到这一点吗?
https://www.npmjs.com/browse/depended/get-cursor-position – thgaskell
'npm ls get-cursor-position'是否工作?我不记得了。 – Ryan