Sha256: e17dc2bc34dd2f2c0f93d3094a4aa80ee94f1d4bf333a68e4f77ca5c973f1dd5

Contents?: true

Size: 331 Bytes

Versions: 6

Compression:

Stored size: 331 Bytes

Contents

function wax.autoload(...)
  for i, folder in ipairs({...}) do
    local files = wax.filesystem.search(wax.root(folder), "lua$")
    for i, file in ipairs(files) do
      local requireString = file:match(wax.root() .. "/(.*)%.lua$")
      requireString = requireString:gsub("/", ".")
      require(requireString)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
candle-0.0.7 lib/candle/generators/lua/wax/lib/stdlib/helpers/autoload.lua
candle-0.0.6 lib/candle/generators/lua/wax/lib/stdlib/helpers/autoload.lua
candle-0.0.4 lib/candle/generators/lua/wax/lib/stdlib/helpers/autoload.lua
candle-0.0.3 lib/candle/generators/lua/wax/lib/stdlib/helpers/autoload.lua
candle-0.0.2 lib/candle/generators/lua/wax/lib/stdlib/helpers/autoload.lua
candle-0.0.1 lib/candle/generators/lua/wax/lib/stdlib/helpers/autoload.lua