mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Define npm_config_jobs env variable in build scripts (#21315)
Adds the npm_config_jobs env variable across build scripts that may benefit from it (ones that run apm install). This variable is used by node-gyp to compile native code with a number of threads equal to the reported CPU core count
This commit is contained in:
@@ -29,6 +29,12 @@ const appName = getAppName(channel);
|
||||
const executableName = getExecutableName(channel, appName);
|
||||
const channelName = getChannelName(channel);
|
||||
|
||||
// Sets the installation jobs to run maximally in parallel if the user has
|
||||
// not already configured this. This is applied just by requiring this file.
|
||||
if (process.env.npm_config_jobs === undefined) {
|
||||
process.env.npm_config_jobs = 'max';
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
appMetadata,
|
||||
apmMetadata,
|
||||
|
||||
Reference in New Issue
Block a user