Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

Commit

Permalink
Remove deprecated and unnecessary electron-rebuild hook
Browse files Browse the repository at this point in the history
Resolves #38.
  • Loading branch information
garrettr committed Jan 12, 2018
1 parent e997acb commit 9b3afcd
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions tasks/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,3 @@ fs.lstat(symlink, (e, stats) => {
console.log(`WARNING: ${symlink} exists but is not a symlink.`);
}
});

// Rebuild native app modules to match electron version
const electron = require('electron');
const electronPackage = require('electron/package.json');
const rebuild = require('electron-rebuild');

const pathToElectronNativeModules = path.join(__dirname, '../app/node_modules');

rebuild.shouldRebuildNativeModules(electron)
.then((shouldBuild) => {
if (!shouldBuild) {
return console.log('Node versions match, skipping rebuild.');
}

console.log('Rebuilding native modules for Electron...');

return rebuild.installNodeHeaders(electronPackage.version)
.then(() => rebuild.rebuildNativeModules(
electronPackage.version, pathToElectronNativeModules))
.then(() => console.log('Rebuilding complete.'));
})
.catch((err) => console.error('Rebuilding error!', err));

0 comments on commit 9b3afcd

Please sign in to comment.