<commit_before>import { app, BrowserWindow, Menu } from 'electron' // eslint-disable-line

/**
 * Set `__static` path to static files in production
 * https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-static-assets.html
 */
if (process.env.NODE_ENV !== 'development') {
  global.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\') // eslint-disable-line
}

let mainWindow;
let mainMenu;

const winURL = process.env.NODE_ENV === 'development'
  ? 'http://localhost:9080'
  : `file://${__dirname}/index.html`;

function createWindow() {
  /**
   * Initial menu options
   */
  const template = [
    {
      role: 'editMenu',
    },
    {
      role: 'windowMenu',
    },
    {
      role: 'help',
      submenu: [
        {
          label: 'Document',
          click() { require('electron').shell.openExternal('https://github.com/LanceGin/QBox/blob/master/README.md'); },
        },
        {
          label: '中文文档',
          click() { require('electron').shell.openExternal('https://github.com/LanceGin/QBox/blob/master/README_zh.md'); },
        },
        {
          type: 'separator',
        },
        {
          label: 'Open Source',
          click() { require('electron').shell.openExternal('https://github.com/LanceGin/QBox'); },
        },
        {
          label: 'License',
          click() { require('electron').shell.openExternal('https://github.com/LanceGin/QBox/blob/master/LICENSE'); },
        },
        {
          type: 'separator',
        },
        {
          label: 'About Author(LanceGin)',
          click() { require('electron').shell.openExternal('http://www.lancegin.cc'); },
        },
      ],
    },
  ];

  if (process.platform === 'darwin') {
    template.unshift({
      label: app.getName(),
      submenu: [
        { role: 'about' },
        { role: 'toggledevtools' },<commit_msg>fix: Guideline 2.2 - Performance<commit_after>import { app, BrowserWindow, Menu } from 'electron' // eslint-disable-line

/**
 * Set `__static` path to static files in production
 * https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-static-assets.html
 */
if (process.env.NODE_ENV !== 'development') {
  global.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\') // eslint-disable-line
}

let mainWindow;
let mainMenu;

const winURL = process.env.NODE_ENV === 'development'
  ? 'http://localhost:9080'
  : `file://${__dirname}/index.html`;

function createWindow() {
  /**
   * Initial menu options
   */
  const template = [
    {
      role: 'editMenu',
    },
    {
      role: 'windowMenu',
    },
    {
      role: 'help',
      submenu: [
        {
          label: 'Document',
          click() { require('electron').shell.openExternal('https://github.com/LanceGin/QBox/blob/master/README.md'); },
        },
        {
          label: '中文文档',
          click() { require('electron').shell.openExternal('https://github.com/LanceGin/QBox/blob/master/README_zh.md'); },
        },
        {
          type: 'separator',
        },
        {
          label: 'Open Source',
          click() { require('electron').shell.openExternal('https://github.com/LanceGin/QBox'); },
        },
        {
          label: 'License',
          click() { require('electron').shell.openExternal('https://github.com/LanceGin/QBox/blob/master/LICENSE'); },
        },
        {
          type: 'separator',
        },
        {
          label: 'About Author(LanceGin)',
          click() { require('electron').shell.openExternal('http://www.lancegin.cc'); },
        },
      ],
    },
  ];

  if (process.platform === 'darwin') {
    template.unshift({
      label: app.getName(),
      submenu: [
        { role: 'about' },
{'fraction_non_alphanumeric': 0.18516527815103467, 'fraction_numerical': 0.0026874496103198066, 'mean_word_length': 2.189374464438732, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 2, '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': '1022489', 'n_tokens_mistral': 1190, 'n_tokens_neox': 1157, 'n_words': 169}