Addnew sheets (armor, weapons, malefica) and v13 support
This commit is contained in:
26
node_modules/liftoff/lib/register_loader.js
generated
vendored
Normal file
26
node_modules/liftoff/lib/register_loader.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
var rechoir = require('rechoir');
|
||||
|
||||
module.exports = function (eventEmitter, extensions, configPath, cwd) {
|
||||
extensions = extensions || {};
|
||||
|
||||
if (typeof configPath !== 'string') {
|
||||
return;
|
||||
}
|
||||
|
||||
var autoloads = rechoir.prepare(extensions, configPath, cwd, true);
|
||||
if (autoloads instanceof Error) {
|
||||
// Only errors
|
||||
autoloads.failures.forEach(function (failed) {
|
||||
eventEmitter.emit('loader:failure', failed.moduleName, failed.error);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Array.isArray(autoloads)) {
|
||||
// Already required or no config.
|
||||
return;
|
||||
}
|
||||
|
||||
var succeeded = autoloads[autoloads.length - 1];
|
||||
eventEmitter.emit('loader:success', succeeded.moduleName, succeeded.module);
|
||||
};
|
||||
Reference in New Issue
Block a user