built template

This commit is contained in:
SomeElse
2026-10-16 07:33:08 +00:00
commit a92978489f
30 changed files with 496 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
#!/usr/bin/env bash
set -euo pipefail
project_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$project_dir"
stylua --check src tests tools
argon sourcemap default.project.json --output sourcemap.json
definitions="${ROBLOX_TYPES:-$project_dir/.cache/globalTypes.d.luau}"
if [[ -n "${ROBLOX_TYPES:-}" ]]; then
if [[ ! -s "$definitions" ]]; then
printf 'ROBLOX_TYPES must point to a nonempty Roblox definitions file: %s\n' "$definitions" >&2
exit 1
fi
elif [[ ! -s "$definitions" ]]; then
mkdir -p .cache
temporary_definitions="$(mktemp "$project_dir/.cache/globalTypes.XXXXXX")"
trap 'rm -f -- "$temporary_definitions"' EXIT
curl -fL --retry 2 --max-time 60 -sS \
https://raw.githubusercontent.com/JohnnyMorganz/luau-lsp/main/scripts/globalTypes.d.luau \
-o "$temporary_definitions"
mv -- "$temporary_definitions" "$definitions"
fi
luau-lsp analyze --platform=roblox --definitions="$definitions" --sourcemap=sourcemap.json src
for test_file in tests/*.luau; do
[[ -f "$test_file" ]] || continue
luau "$test_file"
done
printf 'Checks passed.\n'
+1
View File
@@ -0,0 +1 @@
{ "rules": ["remove_types", "remove_if_expression", "remove_compound_assignment", "remove_continue"], "generator": "readable" }