     for installTarget of installTargets
       installAllStatus.push 1
       toInstall.push installTarget
-    npm.load {prefix: "#{PLUGIN_PATH}", registry: mirror[@state.mirror].server, http_proxy: 'http://127.0.0.1:12450'}, (err) ->
+    npm.load npmConfig, (err) ->
       npm.commands.install toInstall, (er, data) ->
         callback()
     @setState

    if !@props.disabled
      updating = @state.updating
      updating[index] = true
      npm.load {prefix: "#{PLUGIN_PATH}", registry: mirror[@state.mirror].server, http_proxy: 'http://127.0.0.1:12450'}, (err) ->
        npm.commands.update [plugins[index].packageName], (er, data) ->
          callback(index)
      @setState {updating}

  # 0: not installed 1: installing 2: installed
  installStatus.push 0

npmConfig = {
  prefix: "#{PLUGIN_PATH}",
  registry: mirror[config.get "packageManager.mirror", 0].server,
  http_proxy: 'http://127.0.0.1:12450'
}

getAuthorLink = (author, link) ->
  handleClickAuthorLink = (e) ->
    shell.openExternal e.target.dataset.link
