{"size": 840, "ext": "js", "max_stars_repo_path": "src/main/index.js", "max_stars_repo_name": "kozeghong/MyList", "max_stars_repo_stars_event_min_datetime": "2017-11-19T02:34:14.000Z", "max_stars_repo_stars_event_max_datetime": "2017-11-19T02:34:14.000Z", "max_issues_repo_path": "src/main/index.js", "max_issues_repo_name": "kozeghong/MyList", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/main/index.js", "max_forks_repo_name": "kozeghong/MyList", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.5348837209, "max_line_length": 60, "alphanum_fraction": 0.575}
import electron, { app, BrowserWindow } from 'electron'

const isDevelopment = process.env.NODE_ENV !== 'production'

let mainWindow

function createWindow () {
    mainWindow = new BrowserWindow({
        width: 800, 
        height: 600,
        webPreferences: {
            nodeIntegration: true
        }
    })

    let url = isDevelopment
        ? 'http://localhost:9080'
        : `file://${__dirname}/index.html`

    // Open the DevTools.
    if (isDevelopment) mainWindow.webContents.openDevTools()

    mainWindow.loadURL(url)

    mainWindow.on('closed', () => {
        mainWindow = null
    })
}

app.on('ready', createWindow)

app.on('window-all-closed', () => {
    if (process.platform !== 'darwin') {
        app.quit()
    }
})

app.on('activate', () => {
    if (mainWindow === null) {
        createWindow()
    }
})
