We need to configure at least a basic Electron application. Choose a destination for the project files and follow these steps to get started:
- Let's start by creating a new folder called game so that we can store the game project's files and assets:
mkdir game
cd game
- Next, we'll initialize the project and install the Electron and Phaser libraries:
npm init -y
npm i electron
npm i phaser
- As you already know, we need to have a start script in the scripts section of the package.json file. Also, don't forget to update the main entry point.
- Your file should look as follows:
{
"name": "game",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"...