How Electron WorksĮlectron takes a main file defined in your package.json file and executes it. Now that we have set up Electron, let us move on to creating our first app using it. Once it executes, you can check if Electron is installed the right way by running the following command − Now run the following command to install Electron globally. Just keep pressing Enter, and enter your name at the “author name” field.Ĭreate a new folder and open it using the cd command. It will ask you for the following information − Now to create the package.json file using npm, use the following command. Let us set up our development project.įire up your terminal/cmd, create a new folder named hello-world and open that folder using the cd command. npm makes it easy for us to set up this file. Whenever we create a project using npm, we need to provide a package.json file, which has all the details about our project. The above command will generate the following output − Confirm that node and npm are installed by running the following commands in your terminal. If you do not already have these, head over to Node setup to install node on your local system. To get started with developing using the Electron, you need to have Node and npm(node package manager) installed. Electron is used by many companies like Microsoft, Github, Slack, etc.Įlectron has been used to create a number of apps. Github developed Electron for creating the text editor Atom. So all the electron apps are technically web pages running in a browser that can leverage your OS APIs. Instead, Electron uses web pages as its GUI, so you can also see it as a minimal Chromium browser, controlled by JavaScript. This does not mean Electron is a JavaScript binding to graphical user interface (GUI) libraries. Electron enables you to create desktop applications with pure JavaScript by providing a runtime with rich native (operating system) APIs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |