You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
448 B
18 lines
448 B
2 years ago
|
'use strict';
|
||
|
|
||
|
const path = require('path');
|
||
|
const fs = require('fs');
|
||
|
|
||
|
module.exports = async function (app, opts) {
|
||
|
fs.readdirSync(__dirname).forEach((filename) => {
|
||
|
if (!['index.js'].some(f => filename == f)) {
|
||
|
const utils = require(`./${filename}`)(app, opts)
|
||
|
console.log(`载入 ${filename} 工具集成功`);
|
||
|
app.fs.utils = {
|
||
|
...app.fs.utils,
|
||
|
...utils,
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
};
|