To get started with developing using the Electron, you need to have
Node and npm(node package manager) installed. If you don’t already have
these, head over to Node setup
to install node on your local system. Confirm that node and npm are
installed by running the following commands in your terminal.
node --version npm --versionYou should get the output:
v6.9.1 3.10.8Whenever we create a project using npm, we need to provide a package.json file, which has all the details about our project. npm make it easy for us to set up this file. Let us set up our development project.
-
Fire up your terminal/cmd, create a new folder named hello-world and cd into it.
-
Now to create the package.json file using npm, use the following.
npm init
-
It’ll ask you for the following information:
Just keep pressing enter, and enter your name at the “author name” field.
$ npm install -g electron-prebuiltOnce it executes you can check if electron installed correctly by running:
$ electron --versionYou should get the output:
v1.4.13Now that we've set up electron, lets move on to creating our first app using it!
No comments:
Post a Comment