Skip to content

Installation Configuration in package.json

Qianze Zhang edited this page Jan 18, 2021 · 2 revisions

In newest version you can define installation configuration in package.json (or .npmrc, while package.json has a higher priority), usually you can just provide "electron_version" and "prebuilt".

// package.json
{
...
  "agora_electron": {
  		"electron_version": "5.0.8",
  		"prebuilt": true,
  		"platform": "win32"
  		"msvs_version": "2017"
  		"debug": false
  		"silent": false
  }
...
}
// .npmrc
agora_electron_dependent=5.0.8
agora_electron_prebuilt=true
agora_electron_platform=darwin
agora_electron_msvs_version=2017
agora_electron_debug=false
agora_electron_silent=false

Properties detail:

  • prebuilt whether to automatically download prebuilt NodeJS C++ Addon or build locally(which need to provide node-gyp env)
  • electron_version Electron version your application uses(prebuilt only support 1.8.3, 3.0.6, 4.2.8, 5.0.8)
  • platform darwin or win32
  • msvs_version (support on win32 only) visual studio version
  • debug (when prebuilt is false) create a debug-build
  • silent (when prebuilt is false) whether to show build log
Clone this wiki locally