const fse = require('fs-extra'); const path = require('path'); const { getUpdatesURL, getReleaseChannel } = require('./distribution-info'); const projectRoot = path.dirname(__dirname, '..'); const channel = getReleaseChannel(); function getReplacements() { return { __DARWIN__: process.platform === 'darwin', __WIN32__: process.platform === 'win32', __LINUX__: process.platform === 'linux', __DEV__: channel === 'development', __RELEASE_CHANNEL__: JSON.stringify(channel), __UPDATES_URL__: JSON.stringify(getUpdatesURL()), 'process.platform': JSON.stringify(process.platform), 'process.env.NODE_ENV': JSON.stringify( process.env.NODE_ENV || 'development' ), 'process.env.TEST_ENV': JSON.stringify(process.env.TEST_ENV) }; } exports.getReplacements = getReplacements;