{"size": 714, "ext": "js", "max_stars_repo_path": "main.js", "max_stars_repo_name": "Meharban-Singh/screem", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "main.js", "max_issues_repo_name": "Meharban-Singh/screem", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "main.js", "max_forks_repo_name": "Meharban-Singh/screem", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.7894736842, "max_line_length": 51, "alphanum_fraction": 0.6246498599}
const { app, BrowserWindow } = require("electron");

function createWindow() {
	// Create a window
	const win = new BrowserWindow({
		width: 400,
		height: 300,
		webPreferences: {
			nodeIntegration: true,
			contextIsolation: false,
			enableRemoteModule: true,
		},
	});

	// load electron project
	win.loadFile("./src/index.html");

	// prevent resizing of the window
	win.on("will-resize", e => e.preventDefault());
}

// when app is ready, create the window
app.on("ready", () => {
	createWindow();

	app.on("activate", () => {
		if (BrowserWindow.getAllWindows().length === 0) {
			createWindow();
		}
	});
});

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