Let's set up a new project called analytics-tracking, as follows:
- Create a new folder so that you can store all of the project files:
mkdir analytics-tracking
cd analytics-tracking
- Perform a quick setup of the repository using the following commands:
npm init -y
echo node_modules > .gitignore
npm i -D electron
- Drop an index.html file into the project root along with a primary template, as shown in the following code:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>Electron Analytics</title>
</head>
<body>
</body>
</html>
- Create a main.js file in the project root with a minimal set of instructions regarding how to create a new Electron window:
const { app, BrowserWindow } = require('electron');
function createWindow() {
const...