in lib/Api.js [365:379]
static createPlatform (dest, config, options, events) {
if (!config) throw new CordovaError('An Electron platform can not be created with a missing config argument.');
events = setupEvents(events);
const name = config.name();
const id = config.packageName();
try {
// we create the project using our scripts in this platform
return require('./create').createProject(dest, id, name, options).then(() => new Api(null, dest, events));
} catch (e) {
events.emit('error', 'createPlatform is not callable from the electron project API.');
}
}