Support linked npm modules

Fixes #203
This commit is contained in:
Yiyang Hao 2019-12-25 11:30:43 +08:00
parent f2c29b5440
commit 4302d01253

View file

@ -54,7 +54,7 @@ function checkNPM(cancellationToken?: CancellationToken): Promise<void> {
function getNpmDependencies(cwd: string): Promise<string[]> {
return checkNPM()
.then(() => exec('npm list --production --parseable --depth=99999', { cwd, maxBuffer: 5000 * 1024 }))
.then(() => exec('npm list --production --parseable --depth=99999 --link=true', { cwd, maxBuffer: 5000 * 1024 }))
.then(({ stdout }) => stdout
.split(/[\r\n]/)
.filter(dir => path.isAbsolute(dir)));