mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-12-27 08:32:30 +03:00
Get the Electron version from our package.json.
This commit is contained in:
parent
ed92db1f43
commit
8ac72db0b2
3
.npmrc
3
.npmrc
@ -1,4 +1 @@
|
||||
cache = ~/.atom/.npm
|
||||
target = 0.34.5
|
||||
runtime = electron
|
||||
disturl = https://atom.io/download/atom-shell
|
||||
|
@ -4,6 +4,7 @@ var fs = require('fs');
|
||||
var verifyRequirements = require('./utils/verify-requirements');
|
||||
var safeExec = require('./utils/child-process-wrapper.js').safeExec;
|
||||
var path = require('path');
|
||||
var _ = require('underscore-plus');
|
||||
|
||||
// Executes an array of commands one by one.
|
||||
function executeCommands(commands, done, index) {
|
||||
@ -71,6 +72,15 @@ function bootstrap() {
|
||||
var moduleInstallCommand = apmPath + ' install' + apmFlags;
|
||||
var dedupeApmCommand = apmPath + ' dedupe' + apmFlags;
|
||||
|
||||
var electronVersion = require('../package.json').electronVersion;
|
||||
var moduleInstallOptions = {env: _.extend({}, process.env,
|
||||
// `node-pre-gyp` will look for these when determining which binary to
|
||||
// download or how to rebuild.
|
||||
npm_config_target: electronVersion,
|
||||
npm_config_runtime: 'electron',
|
||||
npm_config_disturl: 'https://atom.io/download/atom-shell'
|
||||
)}
|
||||
|
||||
if (process.argv.indexOf('--no-quiet') === -1) {
|
||||
buildInstallCommand += ' --loglevel error';
|
||||
apmInstallCommand += ' --loglevel error';
|
||||
@ -103,6 +113,7 @@ function bootstrap() {
|
||||
{
|
||||
command: moduleInstallCommand,
|
||||
message: 'Installing modules...',
|
||||
options: moduleInstallOptions
|
||||
},
|
||||
{
|
||||
command: dedupeApmCommand + ' ' + packagesToDedupe.join(' '),
|
||||
|
Loading…
Reference in New Issue
Block a user