Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Create a window and a root container:
const win = gui.Window.create({})
win.setContentSize({ width: 400, height: 250 })
const contentView = gui.Container.create()
contentView.setStyle({ flexDirection: 'row' })
win.setContentView(contentView)
win.center()
win.activate()
// Create your react elements and render them:
render(, contentView)
// Start your app
if (!process.versions.yode) {
gui.MessageLoop.run()
process.exit(0)
}
quit() {
for (const win of this.windows)
win.window.close()
require('../view/notification-center').unload()
require('../controller/config-store').serialize()
gui.MessageLoop.quit()
process.gc(true, 2)
// Ignore pending Node.js works.
process.exit(0)
}
}
async function checkSingleInstanceAndStart() {
if (await require('./util/single-instance').check()) {
gui.MessageLoop.quit()
process.exit(0)
}
main()
}