You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
788 B

7 years ago
/* global __DEV__, localStorage */
global.net = require('react-native-tcp');
7 years ago
if (typeof __dirname === 'undefined') global.__dirname = '/';
if (typeof __filename === 'undefined') global.__filename = '';
7 years ago
if (typeof process === 'undefined') {
7 years ago
global.process = require('process');
7 years ago
} else {
7 years ago
const bProcess = require('process');
7 years ago
for (var p in bProcess) {
if (!(p in process)) {
7 years ago
process[p] = bProcess[p];
7 years ago
}
}
}
7 years ago
process.browser = false;
if (typeof Buffer === 'undefined') global.Buffer = require('buffer').Buffer;
7 years ago
// global.location = global.location || { port: 80 }
7 years ago
const isDev = typeof __DEV__ === 'boolean' && __DEV__;
process.env['NODE_ENV'] = isDev ? 'development' : 'production';
7 years ago
if (typeof localStorage !== 'undefined') {
7 years ago
localStorage.debug = isDev ? '*' : '';
7 years ago
}