app/config/app-info.js
crusader 8f4d7ec895 ing
2018-08-15 20:14:23 +09:00

26 lines
771 B
JavaScript

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