As in all the previous chapters, let's start by creating a project scaffold. We are going to call our project music-player; it is going to use a pure JavaScript and HTML5 stack without any additional frameworks. You can always wire a framework of your choice later.
Let's create a new project using the Terminal window or Command Prompt:
- Navigate to your projects or home folder.
- Run the following commands in your Terminal window or Command Prompt:
mkdir music-player
cd music-player
The preceding commands create a new directory for your music player application.
- Now it's time to initialize the project and generate the package.json file. Use the following commands to set up an npm project:
npm init -y
echo node_modules > .gitignore
npm i -D electron
As you can see, besides setting up a new project with NPM, we've also generated a...