Skip to content

Installation Configuration in package.json

Hao Yang edited this page Aug 15, 2019 · 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
npm_config_agora_electron_dependent=5.0.8
npm_config_agora_electron_prebuilt=true
npm_config_agora_electron_platform=darwin
npm_config_agora_electron_msvs_version=2017
npm_config_agora_electron_debug=false
npm_config_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