16 lines
349 B
JavaScript
16 lines
349 B
JavaScript
|
const fs = require('fs');
|
||
|
const path = require('path');
|
||
|
|
||
|
for (const filename of fs.readdirSync(__dirname)) {
|
||
|
if (filename === 'index.js' || !filename.endsWith('.js')) {
|
||
|
continue;
|
||
|
}
|
||
|
const resolved = path.resolve(__dirname, filename);
|
||
|
if (!fs.statSync(resolved).isFile()) {
|
||
|
continue;
|
||
|
}
|
||
|
require(resolved);
|
||
|
}
|
||
|
|
||
|
module.exports = true;
|