Install devDeps in the root package path where they're not cached

This commit is contained in:
Michelle Tilley
2017-05-17 19:01:36 +02:00
parent 8303e179ae
commit 6e61fe9a32
3 changed files with 44 additions and 10 deletions

View File

@@ -95,7 +95,8 @@ for (let packageName in CONFIG.appMetadata.packageDependencies) {
if (require(pkgJsonPath).atomTestRunner) {
console.log(`Installing test runner dependencies for ${packageName}`.bold.green)
if (fs.existsSync(nodeModulesPath)) {
finalize = backupNodeModules(repositoryPackagePath)
const backup = backupNodeModules(repositoryPackagePath)
finalize = backup.restore
} else {
finalize = () => fs.removeSync(nodeModulesPath)
}