|
| 1 | +local Summon = require("./lib/Summon") |
| 2 | +local config = require("@lib/config")() |
| 3 | +local fs = require("@std/fs") |
| 4 | +local net = require("@lute/net") |
| 5 | +local process = require("@lute/process") |
| 6 | + |
| 7 | +local ROBLOX_TYPEDEFS_FILENAME = "roblox.d.luau" |
| 8 | + |
| 9 | +do |
| 10 | + fs.writestringtofile( |
| 11 | + ROBLOX_TYPEDEFS_FILENAME, |
| 12 | + net.request("https://luau-lsp.pages.dev/globalTypes.PluginSecurity.d.luau", { method = "GET" }).body |
| 13 | + ) |
| 14 | + |
| 15 | + Summon.new("rojo", "sourcemap", "--output", config.sourcemap.filename, config.sourcemap.project):assert() |
| 16 | + process.exit(Summon.codeFromMany( |
| 17 | + Summon.new( |
| 18 | + "luau-lsp", |
| 19 | + "analyze", |
| 20 | + `--sourcemap={config.sourcemap.filename}`, |
| 21 | + '--ignore="**/include/**"', |
| 22 | + '--ignore="**/roblox_packages/**"', |
| 23 | + -- FIXME: luau-lsp is analyzing other WTH projects for some reason?? |
| 24 | + "--ignore=../../../../../..", |
| 25 | + "--base-luaurc=.luaurc", |
| 26 | + `--definitions=roblox.d.luau`, |
| 27 | + "--flag:LuauSolverV2=true", |
| 28 | + "src" |
| 29 | + ), |
| 30 | + Summon.new("selene", "src"), |
| 31 | + Summon.new("stylua", "--check", "src") |
| 32 | + )) |
| 33 | +end |
0 commit comments