Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// error in dev mode without babel
if (!(e instanceof ReferenceError)) {
throw e
}
}
const projectDir = process.cwd()
const packageMetadata = new Lazy(() => orNullIfFileNotExist(readJson(path.join(projectDir, "package.json"))))
const config = await getConfig(projectDir, null, null, packageMetadata)
const results = await Promise.all([
computeDefaultAppDirectory(projectDir, use(config.directories, it => it!.app)),
getElectronVersion(projectDir, config, packageMetadata),
])
// if two package.json — force full install (user wants to install/update app deps in addition to dev)
await installOrRebuild(config, results[0], {
frameworkInfo: {version: results[1], useCustomDist: true},
platform: args.platform,
arch: args.arch,
productionDeps: createLazyProductionDeps(results[0], null),
}, results[0] !== projectDir)
}