Restructuring for new way of installing libreevent

This commit is contained in:
janishutz committed 2024-08-26 11:16:28 +02:00
1 parent 4d0b8eb1cb
commit 688b0616cc
223 files changed
+11 -58

No files matched your search

+23
View File
@@ -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' );
};