Skip to content

Commit

Permalink
fix(rebuilder): rebuild modules inside @ scoped folders as well (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound committed Dec 17, 2016
1 parent 558fae3 commit bc21528
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/util/rebuild.js
Expand Up @@ -69,6 +69,9 @@ export default async (buildPath, electronVersion, pPlatform, pArch) => {
const rebuildAllModulesIn = (nodeModulesPath) => {
for (const modulePath of fs.readdirSync(nodeModulesPath)) {
rebuilds.push(rebuildModuleAt(path.resolve(nodeModulesPath, modulePath)));
if (path.resolve(nodeModulesPath, modulePath).startsWith('@')) {
rebuildAllModulesIn(path.resolve(nodeModulesPath, modulePath));
}
if (fs.existsSync(path.resolve(nodeModulesPath, modulePath, 'node_modules'))) {
rebuildAllModulesIn(path.resolve(nodeModulesPath, modulePath, 'node_modules'));
}
Expand Down

0 comments on commit bc21528

Please sign in to comment.