<commit_before>// Module to control application life.
var app = require('app');
// Module to create native browser window.
var BrowserWindow = require('browser-window');
// Module to run process
var spawn = require('child_process').spawn;

// Run process and log output
var child = spawn('./converse');
child.stdout.on('data', function(data) {
	console.log(data);
}); child.stderr.on('data', function(data) {
	console.log(data);
}); child.on('close', function(code) {
	console.log('child process exited with code ' + code);
});

// Report crashes to our server.
require('crash-reporter').start();

// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the javascript object is GCed.
var mainWindow = null;

// Quit when all windows are closed.
app.on('window-all-closed', function() {
	if (process.platform != 'darwin') {
		quit();
	}
});

// This method will be called when Electron has done everything
// initialization and ready for creating browser windows.
app.on('ready', function() {
	// Create the browser window.
	mainWindow = new BrowserWindow({width: 800, height: 600});
	mainWindow.loadUrl('http://localhost:3040');

	// Emitted when the window is closed.
	mainWindow.on('closed', quit);
});

// Quit/kill everything
var quit = function() {
	app.quit();
	child.kill();
}
<commit_msg>On OS X we want to quit the application if all windows are closed.<commit_after>// Module to control application life.
var app = require('app');
// Module to create native browser window.
var BrowserWindow = require('browser-window');
// Module to run process
var spawn = require('child_process').spawn;

// Run process and log output
var child = spawn('./converse');
child.stdout.on('data', function(data) {
	console.log(data);
}); child.stderr.on('data', function(data) {
	console.log(data);
}); child.on('close', function(code) {
	console.log('child process exited with code ' + code);
});

// Report crashes to our server.
require('crash-reporter').start();

// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the javascript object is GCed.
var mainWindow = null;

// Quit when all windows are closed.
app.on('window-all-closed', function() {
	quit();
});

// This method will be called when Electron has done everything
// initialization and ready for creating browser windows.
app.on('ready', function() {
	// Create the browser window.
	mainWindow = new BrowserWindow({width: 800, height: 600});
	mainWindow.loadUrl('http://localhost:3040');

	// Emitted when the window is closed.
	mainWindow.on('closed', quit);
});

// Quit/kill everything
var quit = function() {
	app.quit();
	child.kill();
}

{'fraction_non_alphanumeric': 0.1480117820324006, 'fraction_numerical': 0.007363770250368188, 'mean_word_length': 4.317025440313111, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '5942852', 'n_tokens_mistral': 813, 'n_tokens_neox': 773, 'n_words': 282}