<commit_before>const {app} = require('electron')
const chokidar = require('chokidar')
const fs = require('fs')
const {spawn} = require('child_process')
const path = require('path')

module.exports = (glob, options) => {
  options = options || {}
  let browserWindows = []

  // Main file poses a special case, as its changes are
  // only effective when the process is restarted (hard reset)
  let appPath = app.getAppPath()
  let config = require(path.join(appPath, 'package.json'))
  let mainFile = path.join(appPath, config.main)

  // Watch everything but the node_modules folder and main file
  // main file changes are only effective if hard reset is possible
  let opts = Object.assign({
    ignored:
    [
      mainFile,
      /node_modules|[/\\]\./<commit_msg>When no main program is configured, use index.js.<commit_after>const {app} = require('electron')
const chokidar = require('chokidar')
const fs = require('fs')
const {spawn} = require('child_process')
const path = require('path')

module.exports = (glob, options) => {
  options = options || {}
  let browserWindows = []

  // Main file poses a special case, as its changes are
  // only effective when the process is restarted (hard reset)
  let appPath = app.getAppPath()
  let mainPath = require(path.join(appPath, 'package.json')).main

  if (mainPath === undefined) {
    mainPath = 'index.js'
  }

  let mainFile = path.join(appPath, mainPath)

  // Watch everything but the node_modules folder and main file
  // main file changes are only effective if hard reset is possible
  let opts = Object.assign({
    ignored:
    [
      mainFile,
      /node_modules|[/\\]\./
{'fraction_non_alphanumeric': 0.12530413625304138, 'fraction_numerical': 0.0, 'mean_word_length': 3.594972067039106, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2412381', 'n_tokens_mistral': 495, 'n_tokens_neox': 487, 'n_words': 167}