优化打包方法
This commit is contained in:
14
src/websocket/index.js
Normal file
14
src/websocket/index.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const {findFile} = require("../utils/fsUtils");
|
||||
const chalk = require("chalk");
|
||||
const {log} = console
|
||||
module.exports = {
|
||||
init: ins => {
|
||||
return findFile('./src/websocket', file => {
|
||||
if (!/index\.js/.test(file)) {
|
||||
const ws = require(file.replace(/src[\\\/]websocket/, '.'))
|
||||
log(`${chalk.bgBlue.black(" WEBSOCKET ")} ${ws.action}`)
|
||||
ins.ws(ws.action, ws.execute)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user