aboutsummaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/main.lua b/main.lua
new file mode 100644
index 0000000..ac380c4
--- /dev/null
+++ b/main.lua
@@ -0,0 +1,18 @@
+-- bundler. public domain.
+-- https://citrons.xyz/git/cc-bundler.git
+
+local bundler = require "bundler"
+local platform = require "bundler.platform"
+
+local out, main_module = ...
+local other_modules = {}
+for i = 3, select("#", ...) do
+ table.insert(other_modules, (select(i, ...)))
+end
+
+if not out or not main_module then
+ platform.error "usage: [output file] [main module] [other modules]..."
+ return
+end
+
+platform.write(out, bundler.bundle(main_module, other_modules))