<commit_before>/* eslint strict: 0 */
'use strict';

const electron = require('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
const Menu = electron.Menu;
const crashReporter = electron.crashReporter;
const shell = electron.shell;
let menu;
let template;
let mainWindow = null;

crashReporter.start({
  productName: 'Github Pulls',
  companyName: 'Liferay',
  submitURL: 'https://your-domain.com/url-to-submit',
  autoSubmit: true
});

process.env.NODE_ENV = process.env.NODE_ENV || 'production';

var NODE_ENV = process.env.NODE_ENV;

var DEV_ENV = NODE_ENV === 'development';

require('electron-debug')(
  {
    enabled: true,
    showDevTools: DEV_ENV
  }
);

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

app.on('ready', function() {
  var electronScreen = electron.screen;

  var size = electronScreen.getPrimaryDisplay().workAreaSize;

  global.USER_PREFS_PATH = app.getPath('userData');

  electron.ipcMain.on('userPrefsPath', function(event, arg) {
    event.returnValue = global.USER_PREFS_PATH;
  });

	var windowConfig = {
		height: size.height,
		resizable: true,
    // show: false,
		width: 768
	};

	if (DEV_ENV) {
		// console.log(size);
		// Account for the devtools being open
		windowConfig.width = Math.min(1400, size.width);
	}

  mainWindow = new BrowserWindow(windowConfig);

  mainWindow.loadURL(`file://${__dirname}/app/app.html`);

  var webContents = mainWindow.webContents;

  // webContents.on('did-finish-load', () => {
  //   mainWindow.show();
  //   mainWindow.focus();
  // });

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

  if (DEV_ENV) {
    // require('devtron').install();
    webContents.openDevTools();
  }

  if (process.platform === 'darwin') {
    template = [{
      label: 'Github Pulls',
      submenu: [{
        label: 'About Github Pulls',<commit_msg>electron-debug does this for us already<commit_after>/* eslint strict: 0 */
'use strict';

const electron = require('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
const Menu = electron.Menu;
const crashReporter = electron.crashReporter;
const shell = electron.shell;
let menu;
let template;
let mainWindow = null;

crashReporter.start({
  productName: 'Github Pulls',
  companyName: 'Liferay',
  submitURL: 'https://your-domain.com/url-to-submit',
  autoSubmit: true
});

process.env.NODE_ENV = process.env.NODE_ENV || 'production';

var NODE_ENV = process.env.NODE_ENV;

var DEV_ENV = NODE_ENV === 'development';

require('electron-debug')(
  {
    enabled: true,
    showDevTools: DEV_ENV
  }
);

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

app.on('ready', function() {
  var electronScreen = electron.screen;

  var size = electronScreen.getPrimaryDisplay().workAreaSize;

  global.USER_PREFS_PATH = app.getPath('userData');

  electron.ipcMain.on('userPrefsPath', function(event, arg) {
    event.returnValue = global.USER_PREFS_PATH;
  });

	var windowConfig = {
		height: size.height,
		resizable: true,
    // show: false,
		width: 768
	};

	if (DEV_ENV) {
		// console.log(size);
		// Account for the devtools being open
		windowConfig.width = Math.min(1400, size.width);
	}

  mainWindow = new BrowserWindow(windowConfig);

  mainWindow.loadURL(`file://${__dirname}/app/app.html`);

  var webContents = mainWindow.webContents;

  // webContents.on('did-finish-load', () => {
  //   mainWindow.show();
  //   mainWindow.focus();
  // });

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

  if (process.platform === 'darwin') {
    template = [{
      label: 'Github Pulls',
      submenu: [{
        label: 'About Github Pulls',
{'fraction_non_alphanumeric': 0.16091030789825972, 'fraction_numerical': 0.00428380187416332, 'mean_word_length': 3.7592356687898087, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '25691', 'n_tokens_mistral': 1302, 'n_tokens_neox': 1238, 'n_words': 254}