mirror of
https://github.com/janishutz/libreevent.git
synced 2026-09-22 13:15:25 +02:00
Restructuring for new way of installing libreevent
This commit is contained in:
1 parent
4d0b8eb1cb
commit
688b0616cc
223 files changed
+11
-58
No files matched your search
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* libreevent - pluginLoader.js
|
||||
*
|
||||
* Created by Janis Hutz 08/13/2023, Licensed under the GPL V3 License
|
||||
* https://janishutz.com, development@janishutz.com
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
const fs = require( 'fs' );
|
||||
const path = require( 'path' );
|
||||
|
||||
module.exports = ( app, settings ) => {
|
||||
console.log( '\n\n[ Plugin Loader ] Loading plugins\n' );
|
||||
let otherPlugins = fs.readdirSync( path.join( __dirname + '/others' ) );
|
||||
for ( let plugin in otherPlugins ) {
|
||||
require( './others/' + otherPlugins[ plugin ] + '/' + otherPlugins[ plugin ] + 'Routes.js' )( app, settings );
|
||||
console.log( '[ Plugin Loader ] Loaded plugin "' + otherPlugins[ plugin ] + '"' );
|
||||
}
|
||||
|
||||
require( './payments/' + settings.payments + '/' + settings.payments + 'Routes.js' )( app, settings );
|
||||
console.log( '[ Plugin Loader ] Loaded ' + settings.payments + ' as payment gateway' );
|
||||
};
|
||||
Reference in new issue
Block a user