Create commands/load-cluster.js

This commit is contained in:
Aleksandr Statciuk 2022-01-06 16:01:23 +03:00
parent f5dbc9376e
commit a1f0bc2d2a
10 changed files with 29683 additions and 29503 deletions

View file

@ -32,9 +32,11 @@ async function loadChannels() {
const files = await file.list(options.channels)
for (const filepath of files) {
const dir = file.dirname(filepath)
const items = await parser.parseChannels(filepath)
for (const item of items) {
item.filepath = filepath
item.channelsPath = filepath
item.configPath = `${dir}/${item.site}.config.js`
channels.push(item)
}
}