mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
Fix installing plugins that use node-gyp (#291)
* Fix installing plugins that use `node-gyp` Sets the proper environmental variables to install plugins that have specific needs for compilation e.g. `nodegit`. * Get Electron version from `package.json` for plugins env variable
This commit is contained in:
parent
b76e004309
commit
b938ad4c58
1 changed files with 3 additions and 0 deletions
|
|
@ -193,6 +193,9 @@ function install (fn) {
|
|||
shellEnv().then((env) => {
|
||||
let registry = exports.getDecoratedConfig().npmRegistry;
|
||||
if (registry) env.NPM_CONFIG_REGISTRY = registry;
|
||||
env.npm_config_runtime = 'electron';
|
||||
env.npm_config_target = require('./package.json').devDependencies['electron-prebuilt'];
|
||||
env.npm_config_disturl = 'https://atom.io/download/atom-shell';
|
||||
exec('npm prune && npm install --production', {
|
||||
cwd: path,
|
||||
env: env
|
||||
|
|
|
|||
Loading…
Reference in a new issue