mirror of
https://github.com/pesde-pkg/scripts.git
synced 2024-12-12 15:00:37 +00:00
Erica Marigold
ca5f2d53c8
* Moved all util libs like `channel` into a `lib/` directory within `.lune`. Also includes a builder-pattern exec lib. * Added dev scripts for fmt (stylua) and typecheck (luau-lsp).
21 lines
No EOL
609 B
Text
21 lines
No EOL
609 B
Text
--> Generates a Rojo sourcemap for a provided project directory
|
|
|
|
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.ewrite(
|
|
`\ndone 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?
|
|
return tonumber(require("../src").generators.rojo.sourcemap(
|
|
args[1]
|
|
))
|
|
end) |