mirror of
https://github.com/0x5eal/terracotta.git
synced 2025-01-06 11:29:10 +00:00
chore(build): update darklua rules & write config file to dist dir
This commit is contained in:
parent
8f45fc05f8
commit
5b2384b02d
1 changed files with 16 additions and 12 deletions
|
@ -56,16 +56,21 @@ if not fs.isDir("dist/") then
|
||||||
end
|
end
|
||||||
|
|
||||||
print(`{WAX_PREFIX_FORMAT("info", "[codegen]")} Generating darklua config file at darklua.config.json`)
|
print(`{WAX_PREFIX_FORMAT("info", "[codegen]")} Generating darklua config file at darklua.config.json`)
|
||||||
fs.writeFile(
|
|
||||||
".darklua.json5",
|
if not fs.isFile("dist/.darklua.json5") then
|
||||||
codegen({
|
fs.writeFile(
|
||||||
generator = "dense",
|
"dist/.darklua.json5",
|
||||||
rules = {
|
codegen({
|
||||||
"remove_spaces",
|
generator = "dense",
|
||||||
"rename_variables",
|
rules = {
|
||||||
},
|
"remove_spaces",
|
||||||
})
|
"remove_comments",
|
||||||
)
|
"rename_variables",
|
||||||
|
"rename_variables",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
local loader = task.spawn(function()
|
local loader = task.spawn(function()
|
||||||
local chars = { "-", "\\", "|", "/" }
|
local chars = { "-", "\\", "|", "/" }
|
||||||
|
@ -96,6 +101,7 @@ task.spawn(function()
|
||||||
"verbose=true",
|
"verbose=true",
|
||||||
"minify=true",
|
"minify=true",
|
||||||
"ci-mode=true",
|
"ci-mode=true",
|
||||||
|
"darklua-config-path=dist/.darklua.json5",
|
||||||
"output=dist/terracotta.luau",
|
"output=dist/terracotta.luau",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -111,6 +117,4 @@ task.spawn(function()
|
||||||
print()
|
print()
|
||||||
print(`{WAX_PREFIX_FORMAT("info")} Successfully built terracotta.luau!`)
|
print(`{WAX_PREFIX_FORMAT("info")} Successfully built terracotta.luau!`)
|
||||||
end
|
end
|
||||||
|
|
||||||
fs.removeFile(".darklua.json5")
|
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in a new issue