查看本地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