Skip to content
Permalink
Browse files

feat(importer): delete existing Electron build tools from package.json

  • Loading branch information
malept committed Dec 28, 2016
1 parent bac8680 commit 4152bd2d720179325d645952e4f5720824a23e40
Showing with 15 additions and 0 deletions.
  1. +15 −0 src/electron-forge-import.js
@@ -82,12 +82,27 @@ const main = async () => {
packageJSON.devDependencies = packageJSON.devDependencies || {};

const keys = Object.keys(packageJSON.dependencies).concat(Object.keys(packageJSON.devDependencies));
const buildToolPackages = [
'electron-builder',
'electron-download',
'electron-installer-debian',
'electron-installer-dmg',
'electron-installer-flatpak',
'electron-installer-redhat',
'electron-osx-sign',
'electron-packager',
'electron-winstaller',
];

let electronName;
for (const key of keys) {
if (key === 'electron' || key === 'electron-prebuilt') {
delete packageJSON.dependencies[key];
delete packageJSON.devDependencies[key];
electronName = key;
} else if (buildToolPackages.includes(key)) {
delete packageJSON.dependencies[key];
delete packageJSON.devDependencies[key];
}
}

0 comments on commit 4152bd2

Please sign in to comment.
You can’t perform that action at this time.