Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 934 Bytes

README.md

File metadata and controls

40 lines (28 loc) · 934 Bytes

Usage

Bundle Lua files into one:

lua-bundler "./example/src/Main.lua" "./example/dist/bundle.lua"

If target file name is war3map.lua, inject bundled source to it:

lua-bundler "./example/src/Main.lua" "./example/dist/war3map.lua"

Add -p, --production to minify bundled lua

lua-bundler "./example/src/Main.lua" "./example/dist/bundle.lua" -p
lua-bundler "./example/src/Main.lua" "./example/dist/war3map.lua" -p

Add -e, --exclude to exclude certain files and directories

lua-bundler "./example/src/Main.lua" "./example/dist/bundle.lua" -e "example/src/Reporter.lua"
lua-bundler "./example/src/Main.lua" "./example/dist/bundle.lua" -e "example/src/Reporter.lua;example\src\Dir"

Require flavours

local Module = require("Modules.Module") -- recommended
require("Modules/Module")
require "Modules.Module"

Build with pkg

e.g. pkg . -t node16-win-x64