1- import { app , BrowserWindow } from ' electron' ;
2- import path from ' path' ;
1+ import { app , BrowserWindow } from " electron" ;
2+ import path from " path" ;
33
44// Handle creating/removing shortcuts on Windows when installing/uninstalling.
5- if ( require ( ' electron-squirrel-startup' ) ) {
5+ if ( require ( " electron-squirrel-startup" ) ) {
66 app . quit ( ) ;
77}
88
@@ -12,15 +12,17 @@ const createWindow = () => {
1212 width : 800 ,
1313 height : 600 ,
1414 webPreferences : {
15- preload : path . join ( __dirname , ' preload.js' ) ,
15+ preload : path . join ( __dirname , " preload.js" ) ,
1616 } ,
1717 } ) ;
1818
1919 // and load the index.html of the app.
2020 if ( MAIN_WINDOW_VITE_DEV_SERVER_URL ) {
2121 mainWindow . loadURL ( MAIN_WINDOW_VITE_DEV_SERVER_URL ) ;
2222 } else {
23- mainWindow . loadFile ( path . join ( __dirname , `../renderer/${ MAIN_WINDOW_VITE_NAME } /index.html` ) ) ;
23+ mainWindow . loadFile (
24+ path . join ( __dirname , `../renderer/${ MAIN_WINDOW_VITE_NAME } /index.html` )
25+ ) ;
2426 }
2527
2628 // Open the DevTools.
@@ -30,18 +32,18 @@ const createWindow = () => {
3032// This method will be called when Electron has finished
3133// initialization and is ready to create browser windows.
3234// Some APIs can only be used after this event occurs.
33- app . on ( ' ready' , createWindow ) ;
35+ app . on ( " ready" , createWindow ) ;
3436
3537// Quit when all windows are closed, except on macOS. There, it's common
3638// for applications and their menu bar to stay active until the user quits
3739// explicitly with Cmd + Q.
38- app . on ( ' window-all-closed' , ( ) => {
39- if ( process . platform !== ' darwin' ) {
40+ app . on ( " window-all-closed" , ( ) => {
41+ if ( process . platform !== " darwin" ) {
4042 app . quit ( ) ;
4143 }
4244} ) ;
4345
44- app . on ( ' activate' , ( ) => {
46+ app . on ( " activate" , ( ) => {
4547 // On OS X it's common to re-create a window in the app when the
4648 // dock icon is clicked and there are no other windows open.
4749 if ( BrowserWindow . getAllWindows ( ) . length === 0 ) {
0 commit comments