Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async removeNodeModulesDirAsync(name) {
let nodeModulesPath = path.resolve(this.root, name, 'node_modules');
await rimraf.promise(nodeModulesPath);
console.log('Removed node_modules for "%s"\n', name);
}
const ln = (source, dest) => rimraf.promise(dest).finally(() => exec(`ln -s ${source} ${dest} || true`));
const linkNodeModulesIntoRepos = repo => ln(`${rootPath}/node_modules`, `${pathToRepo(repo)}/node_modules`);