"Electron" electron in the environment under Windows construction

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.