case 'before':
pkg.devDependencies.electron = pkg.dependencies.electron
delete pkg.dependencies.electron
break;
case 'after':
pkg.dependencies.electron = pkg.devDependencies.electron
delete pkg.devDependencies.electron
break;
case 'snap-before':
pkg.description = pkg.corifeus['description-snap'];
break;
case 'snap-after':
pkg.description = pkg.corifeus['description-npm'];
break;
default:
throw new Error(`Unknown mode ${mode}`)
}
await fs.writeFile(pkgFile, JSON.stringify(pkg, null, 4))
}
asyncStart()