Lazily require modules in lib/common/index
no issue - decreases chance of not-loaded modules or circular dependencies - e.g. the i18n implementation will use the settings-cache and the settings-cache uses lib/common/events
This commit is contained in:
parent
8ea861c496
commit
a1393762f6
@ -1,4 +1,19 @@
|
||||
module.exports.i18n = require('./i18n');
|
||||
module.exports.events = require('./events');
|
||||
module.exports.errors = require('./errors');
|
||||
module.exports.logging = require('./logging');
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
get i18n() {
|
||||
return require('./i18n');
|
||||
},
|
||||
|
||||
get events() {
|
||||
return require('./events');
|
||||
},
|
||||
|
||||
get errors() {
|
||||
return require('./errors');
|
||||
},
|
||||
|
||||
get logging() {
|
||||
return require('./logging');
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user