From a8bbc8a9a0314f6a47066a040931add5dddfcf81 Mon Sep 17 00:00:00 2001 From: Jonatan Heyman Date: Fri, 13 Jan 2023 01:39:59 +0100 Subject: [PATCH] Remove built files --- heynote-electron/dist-electron/main/index.js | 1 - heynote-electron/dist-electron/main/index.js.map | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/heynote-electron/dist-electron/main/index.js b/heynote-electron/dist-electron/main/index.js index 4a0e81d..7689239 100644 --- a/heynote-electron/dist-electron/main/index.js +++ b/heynote-electron/dist-electron/main/index.js @@ -29,7 +29,6 @@ async function createWindow() { }); if (process.env.VITE_DEV_SERVER_URL) { win.loadURL(url); - win.webContents.openDevTools(); } else { win.loadFile(indexHtml); } diff --git a/heynote-electron/dist-electron/main/index.js.map b/heynote-electron/dist-electron/main/index.js.map index 07a77ce..ad7fca1 100644 --- a/heynote-electron/dist-electron/main/index.js.map +++ b/heynote-electron/dist-electron/main/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../../electron/main/index.ts"],"sourcesContent":["import { app, BrowserWindow, shell, ipcMain } from 'electron'\nimport { release } from 'node:os'\nimport { join } from 'node:path'\n\n// The built directory structure\n//\n// ├─┬ dist-electron\n// │ ├─┬ main\n// │ │ └── index.js > Electron-Main\n// │ └─┬ preload\n// │ └── index.js > Preload-Scripts\n// ├─┬ dist\n// │ └── index.html > Electron-Renderer\n//\nprocess.env.DIST_ELECTRON = join(__dirname, '..')\nprocess.env.DIST = join(process.env.DIST_ELECTRON, '../dist')\nprocess.env.PUBLIC = process.env.VITE_DEV_SERVER_URL\n ? join(process.env.DIST_ELECTRON, '../public')\n : process.env.DIST\n\n// Disable GPU Acceleration for Windows 7\nif (release().startsWith('6.1')) app.disableHardwareAcceleration()\n\n// Set application name for Windows 10+ notifications\nif (process.platform === 'win32') app.setAppUserModelId(app.getName())\n\nif (!app.requestSingleInstanceLock()) {\n app.quit()\n process.exit(0)\n}\n\n// Remove electron security warnings\n// This warning only shows in development mode\n// Read more on https://www.electronjs.org/docs/latest/tutorial/security\n// process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'\n\nlet win: BrowserWindow | null = null\n// Here, you can also use other preload\nconst preload = join(__dirname, '../preload/index.js')\nconst url = process.env.VITE_DEV_SERVER_URL\nconst indexHtml = join(process.env.DIST, 'index.html')\n\nasync function createWindow() {\n win = new BrowserWindow({\n title: 'Main window',\n icon: join(process.env.PUBLIC, 'favicon.ico'),\n //titleBarStyle: 'customButtonsOnHover',\n webPreferences: {\n preload,\n // Warning: Enable nodeIntegration and disable contextIsolation is not secure in production\n // Consider using contextBridge.exposeInMainWorld\n // Read more on https://www.electronjs.org/docs/latest/tutorial/context-isolation\n nodeIntegration: true,\n contextIsolation: false,\n },\n })\n\n if (process.env.VITE_DEV_SERVER_URL) { // electron-vite-vue#298\n win.loadURL(url)\n // Open devTool if the app is not packaged\n win.webContents.openDevTools()\n } else {\n win.loadFile(indexHtml)\n }\n\n // Test actively push message to the Electron-Renderer\n win.webContents.on('did-finish-load', () => {\n win?.webContents.send('main-process-message', new Date().toLocaleString())\n })\n\n // Make all links open with the browser, not with the application\n win.webContents.setWindowOpenHandler(({ url }) => {\n if (url.startsWith('https:')) shell.openExternal(url)\n return { action: 'deny' }\n })\n}\n\napp.whenReady().then(createWindow)\n\napp.on('window-all-closed', () => {\n win = null\n if (process.platform !== 'darwin') app.quit()\n})\n\napp.on('second-instance', () => {\n if (win) {\n // Focus on the main window if the user tried to open another\n if (win.isMinimized()) win.restore()\n win.focus()\n }\n})\n\napp.on('activate', () => {\n const allWindows = BrowserWindow.getAllWindows()\n if (allWindows.length) {\n allWindows[0].focus()\n } else {\n createWindow()\n }\n})\n\n// New window example arg: new windows url\nipcMain.handle('open-win', (_, arg) => {\n const childWindow = new BrowserWindow({\n webPreferences: {\n preload,\n nodeIntegration: true,\n contextIsolation: false,\n },\n })\n\n if (process.env.VITE_DEV_SERVER_URL) {\n childWindow.loadURL(`${url}#${arg}`)\n } else {\n childWindow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AW,QAAQ;AAAGC,qBAAM,aAAaD,IAAG;AAC7C,WAAA,EAAE,QAAQ;EAAO,CACzB;AACH;AAEAF,SAAI,IAAA,UAAY,EAAA,KAAK,YAAY;AAEjCA,SAAAA,IAAI,GAAG,qBAAqB,MAAM;AAC1B,QAAA;AACN,MAAI,QAAQ,aAAa;AAAUA,aAAA,IAAI,KAAK;AAC9C,CAAC;AAEDA,SAAAA,IAAI,GAAG,mBAAmB,MAAM;AAC9B,MAAI,KAAK;AAEP,QAAI,IAAI,YAAY;AAAG,UAAI,QAAQ;AACnC,QAAI,MAAM;AAAA,EACZ;AACF,CAAC;AAEDA,SAAAA,IAAI,GAAG,YAAY,MAAM;AACjB,QAAA,aAAaC,uBAAc;AACjC,MAAI,WAAW,QAAQ;AACrB,eAAW,GAAG;EAAM,OACf;AACQ;EACf;AACF,CAAC;AAGDG,SAAA,QAAQ,OAAO,YAAY,CAAC,GAAG,QAAQ;AAC/B,QAAA,cAAc,IAAIH,uBAAc;AAAA,IACpC,gBAAgB;AAAA,MACd;AAAA,MACA,iBAAiB;AAAA,MACjB,kBAAkB;AAAA,IACpB;AAAA,EAAA,CACD;AAEG,MAAA,QAAQ,IAAI,qBAAqB;AACvB,gBAAA,QAAQ,GAAG,OAAO,KAAK;AAAA,EAAA,OAC9B;AACL,gBAAY,SAAS,WAAW,EAAE,MAAM,IAAK,CAAA;AAAA,EAC/C;AACF,CAAC;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../../electron/main/index.ts"],"sourcesContent":["import { app, BrowserWindow, shell, ipcMain, Menu } from 'electron'\nimport { release } from 'node:os'\nimport { join } from 'node:path'\n\n// The built directory structure\n//\n// ├─┬ dist-electron\n// │ ├─┬ main\n// │ │ └── index.js > Electron-Main\n// │ └─┬ preload\n// │ └── index.js > Preload-Scripts\n// ├─┬ dist\n// │ └── index.html > Electron-Renderer\n//\nprocess.env.DIST_ELECTRON = join(__dirname, '..')\nprocess.env.DIST = join(process.env.DIST_ELECTRON, '../dist')\nprocess.env.PUBLIC = process.env.VITE_DEV_SERVER_URL\n ? join(process.env.DIST_ELECTRON, '../public')\n : process.env.DIST\n\n// Disable GPU Acceleration for Windows 7\nif (release().startsWith('6.1')) app.disableHardwareAcceleration()\n\n// Set application name for Windows 10+ notifications\nif (process.platform === 'win32') app.setAppUserModelId(app.getName())\n\nif (!app.requestSingleInstanceLock()) {\n app.quit()\n process.exit(0)\n}\n\n// Remove electron security warnings\n// This warning only shows in development mode\n// Read more on https://www.electronjs.org/docs/latest/tutorial/security\n// process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'\n\nlet win: BrowserWindow | null = null\n// Here, you can also use other preload\nconst preload = join(__dirname, '../preload/index.js')\nconst url = process.env.VITE_DEV_SERVER_URL\nconst indexHtml = join(process.env.DIST, 'index.html')\n\nasync function createWindow() {\n win = new BrowserWindow({\n title: 'Main window',\n icon: join(process.env.PUBLIC, 'favicon.ico'),\n //titleBarStyle: 'customButtonsOnHover',\n webPreferences: {\n preload,\n // Warning: Enable nodeIntegration and disable contextIsolation is not secure in production\n // Consider using contextBridge.exposeInMainWorld\n // Read more on https://www.electronjs.org/docs/latest/tutorial/context-isolation\n nodeIntegration: true,\n contextIsolation: false,\n },\n })\n\n if (process.env.VITE_DEV_SERVER_URL) { // electron-vite-vue#298\n win.loadURL(url)\n // Open devTool if the app is not packaged\n //win.webContents.openDevTools()\n } else {\n win.loadFile(indexHtml)\n //win.webContents.openDevTools()\n }\n\n // Test actively push message to the Electron-Renderer\n win.webContents.on('did-finish-load', () => {\n win?.webContents.send('main-process-message', new Date().toLocaleString())\n })\n\n // Make all links open with the browser, not with the application\n win.webContents.setWindowOpenHandler(({ url }) => {\n if (url.startsWith('https:')) shell.openExternal(url)\n return { action: 'deny' }\n })\n}\n\napp.whenReady().then(createWindow)\n\napp.on('window-all-closed', () => {\n win = null\n if (process.platform !== 'darwin') app.quit()\n})\n\napp.on('second-instance', () => {\n if (win) {\n // Focus on the main window if the user tried to open another\n if (win.isMinimized()) win.restore()\n win.focus()\n }\n})\n\napp.on('activate', () => {\n const allWindows = BrowserWindow.getAllWindows()\n if (allWindows.length) {\n allWindows[0].focus()\n } else {\n createWindow()\n }\n})\n\n// New window example arg: new windows url\nipcMain.handle('open-win', (_, arg) => {\n const childWindow = new BrowserWindow({\n webPreferences: {\n preload,\n nodeIntegration: true,\n contextIsolation: false,\n },\n })\n\n if (process.env.VITE_DEV_SERVER_URL) {\n childWindow.loadURL(`${url}#${arg}`)\n } else {\n childWindow.loadFile(indexHtml, { hash: arg })\n }\n})\n"],"names":["join","release","app","BrowserWindow","url","shell","ipcMain"],"mappings":";;;;AAcA,QAAQ,IAAI,gBAAgBA,UAAK,KAAA,WAAW,IAAI;AAChD,QAAQ,IAAI,OAAOA,UAAA,KAAK,QAAQ,IAAI,eAAe,SAAS;AAC5D,QAAQ,IAAI,SAAS,QAAQ,IAAI,sBAC7BA,UAAA,KAAK,QAAQ,IAAI,eAAe,WAAW,IAC3C,QAAQ,IAAI;AAGhB,IAAIC,gBAAU,EAAA,WAAW,KAAK;AAAGC,WAAA,IAAI,4BAA4B;AAGjE,IAAI,QAAQ,aAAa;AAAaA,WAAAA,IAAA,kBAAkBA,aAAI,QAAS,CAAA;AAErE,IAAI,CAACA,SAAAA,IAAI,6BAA6B;AACpCA,WAAA,IAAI,KAAK;AACT,UAAQ,KAAK,CAAC;AAChB;AAOA,IAAI,MAA4B;AAEhC,MAAM,UAAUF,UAAK,KAAA,WAAW,qBAAqB;AACrD,MAAM,MAAM,QAAQ,IAAI;AACxB,MAAM,YAAYA,UAAA,KAAK,QAAQ,IAAI,MAAM,YAAY;AAErD,eAAe,eAAe;AAC5B,QAAM,IAAIG,SAAAA,cAAc;AAAA,IACtB,OAAO;AAAA,IACP,MAAMH,UAAAA,KAAK,QAAQ,IAAI,QAAQ,aAAa;AAAA,IAE5C,gBAAgB;AAAA,MACd;AAAA,MAIA,iBAAiB;AAAA,MACjB,kBAAkB;AAAA,IACpB;AAAA,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