summaryrefslogtreecommitdiff
path: root/server/src/async/scanfiles.lua
blob: 900cc0a8e247bed3c2bc402ff87b082f4eeba002 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
local root = ...

require 'utility'
local fs = require 'bee.filesystem'
local list = {}
local ignore = {
    ['.git'] = true,
    ['node_modules'] = true,
}

for path in io.scan(fs.path(root), ignore) do
    if path:extension():string() == '.lua' then
        list[#list+1] = path:string()
    end
end

OUT:push(list)