25 lines
572 B
JavaScript
25 lines
572 B
JavaScript
import store from 'store.js';
|
|
import lbry from './lbry.js';
|
|
|
|
const env = ENV;
|
|
const config = require(`./config/${env}`);
|
|
const logs = [];
|
|
const app = {
|
|
env: env,
|
|
config: config,
|
|
store: store,
|
|
logs: logs,
|
|
log: function(message) {
|
|
console.log(message);
|
|
logs.push(message);
|
|
}
|
|
}
|
|
|
|
const language = lbry.getClientSetting('language') ? lbry.getClientSetting('language') : 'en';
|
|
const i18n = require('y18n')({directory: 'app/locales', locale: language});
|
|
window.__ = i18n.__;
|
|
window.__n = i18n.__n;
|
|
window.i18n = i18n;
|
|
|
|
global.app = app;
|
|
module.exports = app;
|