mirror of
https://github.com/S2-/gitlit
synced 2025-08-03 21:00:04 +02:00
update dependencies
This commit is contained in:
8
node_modules/electron-packager/prune.js
generated
vendored
8
node_modules/electron-packager/prune.js
generated
vendored
@@ -56,10 +56,16 @@ class Pruner {
|
||||
}
|
||||
}
|
||||
|
||||
function isNodeModuleFolder (pathToCheck) {
|
||||
return path.basename(path.dirname(pathToCheck)) === 'node_modules' ||
|
||||
// TODO: Change to startsWith in Node 6
|
||||
(path.basename(path.dirname(pathToCheck))[0] === '@' && path.basename(path.resolve(pathToCheck, `..${path.sep}..`)) === 'node_modules')
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
isModule: function isModule (pathToCheck) {
|
||||
return fs.pathExists(path.join(pathToCheck, 'package.json'))
|
||||
.then(exists => exists && path.basename(path.dirname(pathToCheck)) === 'node_modules')
|
||||
.then(exists => exists && isNodeModuleFolder(pathToCheck))
|
||||
},
|
||||
Pruner: Pruner
|
||||
}
|
||||
|
Reference in New Issue
Block a user