diff --git a/examples/basic.luau b/examples/basic.luau new file mode 100644 index 0000000..018ede8 --- /dev/null +++ b/examples/basic.luau @@ -0,0 +1,25 @@ +local Fs = require("@lune/fs") + +local Terracotta = require("..") + +Terracotta.Build({ + entryPoints = { "utils/fs.luau", "darklua/cmd.luau" }, + bundle = true, +}) + +-- OR -- + +local terracotta = Terracotta.new() + +local outputs = terracotta:Build({ + entryPoints = { "utils/fs.luau", "darklua/cmd.luau" }, + bundle = true, + rules = { + "remove_spaces", + "remove_comments", + "rename_variables", + "rename_variables", + }, +}) + +Fs.writeFile("darklua.luau", outputs["darklua/cmd.luau"]) diff --git a/init.luau b/init.luau new file mode 100644 index 0000000..3b2dc08 --- /dev/null +++ b/init.luau @@ -0,0 +1 @@ +return require("src/terracotta") diff --git a/src/init.luau b/src/init.luau index ca684af..f051cd9 100644 --- a/src/init.luau +++ b/src/init.luau @@ -1,19 +1 @@ -local Fs = require("@lune/fs") - -local Terracotta = require("terracotta") - -Terracotta.Build({ - entryPoints = { "utils/fs.luau", "darklua/cmd.luau" }, - bundle = true, -}) - --- OR -- - -local terracotta = Terracotta.new() - -local outputs = terracotta:Build({ - entryPoints = { "utils/fs.luau", "darklua/cmd.luau" }, - bundle = true, -}) - -Fs.writeFile("darklua.luau", outputs["darklua/cmd.luau"]) +return require("terracotta")