commit c11112256db14c1e63551067c074ee78c31a62bc Author: Rushil Umaretiya Date: Mon Nov 14 13:30:23 2022 -0500 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..07d2252 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules +out \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..1b57f35 --- /dev/null +++ b/index.html @@ -0,0 +1,20 @@ + + + + + + + + Hello World! + + +
+ +
+ + diff --git a/main.js b/main.js new file mode 100644 index 0000000..3c9bed7 --- /dev/null +++ b/main.js @@ -0,0 +1,42 @@ +// Modules to control application life and create native browser window +const {app, BrowserWindow} = require('electron') +const path = require('path') + +function createWindow () { + // Create the browser window. + const mainWindow = new BrowserWindow({ + fullscreen: true, + webPreferences: { + preload: path.join(__dirname, 'preload.js') + } + }) + + // and load the index.html of the app. + mainWindow.loadFile('index.html') + + // Open the DevTools. + // mainWindow.webContents.openDevTools() +} + +// This method will be called when Electron has finished +// initialization and is ready to create browser windows. +// Some APIs can only be used after this event occurs. +app.whenReady().then(() => { + createWindow() + + app.on('activate', function () { + // On macOS it's common to re-create a window in the app when the + // dock icon is clicked and there are no other windows open. + if (BrowserWindow.getAllWindows().length === 0) createWindow() + }) +}) + +// Quit when all windows are closed, except on macOS. There, it's common +// for applications and their menu bar to stay active until the user quits +// explicitly with Cmd + Q. +app.on('window-all-closed', function () { + if (process.platform !== 'darwin') app.quit() +}) + +// In this file you can include the rest of your app's specific main process +// code. You can also put them in separate files and require them here. diff --git a/package.json b/package.json new file mode 100644 index 0000000..fa49fc1 --- /dev/null +++ b/package.json @@ -0,0 +1,50 @@ +{ + "name": "gigantic-polish-contain-n0a5q", + "productName": "gigantic-polish-contain-n0a5q", + "description": "My Electron application description", + "keywords": [], + "main": "./main.js", + "version": "1.0.0", + "author": "rushilwiz", + "scripts": { + "start": "electron-forge start", + "package": "electron-forge package", + "make": "electron-forge make", + "publish": "electron-forge publish", + "lint": "echo \"No linting configured\"" + }, + "dependencies": {}, + "devDependencies": { + "@electron-forge/cli": "^6.0.0-beta.64", + "@electron-forge/maker-deb": "^6.0.0-beta.64", + "@electron-forge/maker-rpm": "^6.0.0-beta.64", + "@electron-forge/maker-squirrel": "^6.0.0-beta.64", + "@electron-forge/maker-zip": "^6.0.0-beta.64", + "electron": "^21.2.3" + }, + "config": { + "forge": { + "packagerConfig": {}, + "makers": [ + { + "name": "@electron-forge/maker-squirrel" + }, + { + "name": "@electron-forge/maker-zip", + "platforms": [ + "darwin" + ] + }, + { + "name": "@electron-forge/maker-deb", + "config": {} + }, + { + "name": "@electron-forge/maker-rpm", + "config": {} + } + ] + } + }, + "license": "MIT" +} diff --git a/preload.js b/preload.js new file mode 100644 index 0000000..ce1a98e --- /dev/null +++ b/preload.js @@ -0,0 +1,8 @@ +/** + * The preload script runs before. It has access to web APIs + * as well as Electron's renderer process modules and some + * polyfilled Node.js functions. + * + * https://www.electronjs.org/docs/latest/tutorial/sandbox + */ +console.log("stay calm.") \ No newline at end of file diff --git a/renderer.js b/renderer.js new file mode 100644 index 0000000..1e70849 --- /dev/null +++ b/renderer.js @@ -0,0 +1,7 @@ +/** + * This file is loaded via the