mirror of
https://github.com/littensy/charm.git
synced 2026-10-20 17:51:37 +00:00
33 lines
889 B
Text
33 lines
889 B
Text
local fs = require("@std/fs")
|
|
local net = require("@std/net")
|
|
local process = require("@lute/process")
|
|
|
|
process.run({ "rojo", "sourcemap", "--output=sourcemap.json" }, { stdio = "inherit" })
|
|
|
|
fs.writeStringToFile(
|
|
"roblox.d.luau",
|
|
net.request("https://luau-lsp.pages.dev/globalTypes.None.d.luau", { method = "GET" }).body
|
|
)
|
|
|
|
local analyze = process.run({
|
|
"luau-lsp",
|
|
"analyze",
|
|
"--sourcemap=sourcemap.json",
|
|
"--ignore=**/node_modules/**",
|
|
"--base-luaurc=.luaurc",
|
|
"--definitions=roblox.d.luau",
|
|
"--flag:LuauSolverV2=true",
|
|
"packages",
|
|
"tests",
|
|
"benches",
|
|
}, { stdio = "inherit" })
|
|
|
|
fs.remove("roblox.d.luau")
|
|
|
|
local stylua = process.run({ "stylua", "--check", "packages", "tests", "benches" }, { stdio = "inherit" })
|
|
|
|
local eslint = process.run({ "pnpm", "eslint", "packages" }, { stdio = "inherit" })
|
|
|
|
if not (analyze.ok and stylua.ok and eslint.ok) then
|
|
process.exit(1)
|
|
end
|