mirror of
https://github.com/0x5eal/terracotta.git
synced 2024-12-12 12:50:35 +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
|
||||
|
||||
print(`{WAX_PREFIX_FORMAT("info", "[codegen]")} Generating darklua config file at darklua.config.json`)
|
||||
fs.writeFile(
|
||||
".darklua.json5",
|
||||
codegen({
|
||||
generator = "dense",
|
||||
rules = {
|
||||
"remove_spaces",
|
||||
"rename_variables",
|
||||
},
|
||||
})
|
||||
)
|
||||
|
||||
if not fs.isFile("dist/.darklua.json5") then
|
||||
fs.writeFile(
|
||||
"dist/.darklua.json5",
|
||||
codegen({
|
||||
generator = "dense",
|
||||
rules = {
|
||||
"remove_spaces",
|
||||
"remove_comments",
|
||||
"rename_variables",
|
||||
"rename_variables",
|
||||
},
|
||||
})
|
||||
)
|
||||
end
|
||||
|
||||
local loader = task.spawn(function()
|
||||
local chars = { "-", "\\", "|", "/" }
|
||||
|
@ -96,6 +101,7 @@ task.spawn(function()
|
|||
"verbose=true",
|
||||
"minify=true",
|
||||
"ci-mode=true",
|
||||
"darklua-config-path=dist/.darklua.json5",
|
||||
"output=dist/terracotta.luau",
|
||||
})
|
||||
|
||||
|
@ -111,6 +117,4 @@ task.spawn(function()
|
|||
print()
|
||||
print(`{WAX_PREFIX_FORMAT("info")} Successfully built terracotta.luau!`)
|
||||
end
|
||||
|
||||
fs.removeFile(".darklua.json5")
|
||||
end)
|
||||
|
|
Loading…
Reference in a new issue