Electron application Packaging

Source: Internet
Author: User
Electron application Packaging

Electron Application Package Installation Electron-packager Modify Packagejson file Package

After the previous blog installation Electron-packager

$ sudo cnpm install--save-dev Electron-packager
modifying Package.json files
{
  "name": "MyApp", "
  Version": "0.1.0",
  "main": "Main.js",
  "scripts": {
    "start": "Electron Main.js ","
    Packager ":" Electron-packager. --platform=linux--electron-version=1.6.6  --overwrite "

  },
  " Devdependencies ": {
    " Electron-packager ":" ^8.7.0 "
  }
}

Note: Only the Linux platform is specified here, and you can modify packages that are packaged all over the platform. Packaged

$ ELECTRON_MIRROR=HTTP://NPM.TAOBAO.ORG/MIRRORS/ELECTRON/NPM Run-script Packager

here to explain, the above command set the Electron_mirror use Taobao image, if not using Taobao mirror, download the package will be wrong.

After packing, you can see that a myapp-linux-x64 directory is generated under MyApp, and running Myapp-linux-x64/myapp can start the application.

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.