mirror of
https://github.com/pesde-pkg/scripts.git
synced 2024-12-12 15:00:37 +00:00
Erica Marigold
83ab6bf97f
* Sets up a test runner system and includes unit tests for existing generators using Rojo's test files. * Configure Luau analysis and disables unnecessary lints. * Make sync config generator accept a third options argument with a `force` option to generate configs even when there is a `default.project.json` present in the `projectDir`.
17 lines
608 B
Text
17 lines
608 B
Text
local function enter(fn: (args: { string }) -> number?): never
|
|
local process = require("@lune/process")
|
|
local stdio = require("@lune/stdio")
|
|
|
|
local startTime = os.clock()
|
|
local exitCode = fn(table.clone(process.args))
|
|
|
|
stdio.write(`done in {stdio.style("dim")}{string.format("%.2fs", os.clock() - startTime)}{stdio.style("reset")}!\n`)
|
|
|
|
return process.exit(exitCode)
|
|
end
|
|
|
|
return enter(function(args: { string }): number?
|
|
local ok, _ = require("../src").generators.rojo.syncConfig(table.remove(args, 1), args, { writeToFile = true })
|
|
|
|
return tonumber(ok)
|
|
end)
|