Electron is now accepted by the public as a way to write desktop programs using JavaScript. Here's how to quickly build an electron development environment under Windows (>WIN7).
1. Installation of Nodejs
Download the latest version of Windows Installer from Nodejs to install it. I downloaded the v6.9.1, the installation is the default, this installation will Nodejs and NPM configuration to the system path, so that anywhere in the command line can be directly in node execution Nodejs, with NPM to execute NPM command.
Check to see if Nodejs is installed successfully:
In addition, because of the possible GFW problem (or the download will be slow or slow, it may fail to download), it is recommended to switch the NPM repository to the domestic Taobao warehouse and execute the following command:
NPM Config Set registry "https://registry.npm.taobao.org/"
There is also a way to register the CNPM command as follows (I use the second type):
NPM install-g cnpm--registry=https://registry.npm.taobao.org
The results are as follows:
2. Electron installation
Because NODE/NPM is already enabled in the front, you can install the electron using NPM.
For the convenience of testing, I use the following command in the Command line window:
NPM install-g Electron
The effect is as follows:
Where to see if the electron is installed successfully can be viewed by command electron-v.
Online some say the command is NPM install-g electron-prebuilt, in fact this is an earlier version of the command, now has been updated to electron, as follows:
3. Programming Environment Installation
Microsoft is strongly recommended to exit the VS code, directly download the installation can, it supports NODEJS and other code hints, is very convenient.
4. Packaging Output Tools
In order to facilitate the final output, it is recommended to install the Electron-packager tool, installation is also very simple, it is recommended to install the following command globally:
NPM install-g Electron-packager
The effect is as follows:
5. If you need to use Git for version control, we recommend that you install the Git tool
Download the latest version of the installation directly from Git.
So far the development environment has been built.
"Electron" electron in the environment under Windows construction