-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Add support ignoring parent node_modules for monorepos? #73
Comments
like this
exports.getModulesNamesFromDirLocal = function getModulesNamesFromDirLocal(dir) {
return exports.readDir(path.resolve(dir, './node_modules')).filter(x => {
return !exports.contains(['.bin'], x)
})
}
exports.getModulesNamesFromDir = function getModulesNamesFromDir(dir) {
const allFoundModules = []
const pathParts = dir.split(path.sep)
for (let i = pathParts.length - 1; i >= 0; i--) {
const parentDirs = pathParts.slice(0, i)
const parentPath = parentDirs.join(path.sep)
const foundModules = exports.getModulesNamesFromDirLocal(parentPath)
allFoundModules.push(...foundModules)
}
return allFoundModules
} |
In version 2 you can pass |
@liady this functionality should work by default since |
@liady Yeah this is definitely needed when using |
Yes its needed. Why should a package explicitly point to a directory, which is out of responsibility of this package? (node_modules in monorepo root for example). |
Maybe it could be an option such as |
Add support ignoring parent node_modules for monorepos?
The text was updated successfully, but these errors were encountered: