Try just setting the target?

This commit is contained in:
joshaber
2015-12-28 16:50:00 -05:00
parent a7ba6c8638
commit 666958d6b9
2 changed files with 12 additions and 1 deletions

2
.npmrc
View File

@@ -1 +1,3 @@
cache = ~/.atom/.npm
runtime = electron
disturl = https://atom.io/download/atom-shell

View File

@@ -71,8 +71,14 @@ function bootstrap() {
var moduleInstallCommand = apmPath + ' install' + apmFlags;
var dedupeApmCommand = apmPath + ' dedupe' + apmFlags;
var moduleInstallEnv = {};
for (var e in process.env) {
moduleInstallEnv[e] = process.env[e];
}
var electronVersion = require('../package.json').electronVersion;
apmFlags += ' --target=' + electronVersion + ' --runtime=electron --dist-url=https://atom.io/download/atom-shell';
moduleInstallEnv.npm_config_target = electronVersion;
var moduleInstallOptions = {env: moduleInstallEnv};
if (process.argv.indexOf('--no-quiet') === -1) {
buildInstallCommand += ' --loglevel error';
@@ -102,12 +108,15 @@ function bootstrap() {
{
command: apmPath + ' clean' + apmFlags,
message: 'Deleting old modules...',
options: moduleInstallOptions
},
{
command: moduleInstallCommand,
options: moduleInstallOptions
},
{
command: dedupeApmCommand + ' ' + packagesToDedupe.join(' '),
options: moduleInstallOptions
}
];