-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.justfile
54 lines (40 loc) · 1.28 KB
/
.justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env just --justfile
set dotenv-load
project_dir := absolute_path("src")
build_dir := absolute_path("build")
packages_dir := absolute_path("Packages")
test_project := "test.project.json"
tmpdir := `mktemp -d`
global_defs_path := tmpdir / "globalTypes.d.lua"
sourcemap_path := tmpdir / "sourcemap.json"
default:
@just --list
build:
rojo build packages.project.json -o MatterReplication.rbxm
build-example:
rojo build example/default.project.json -o MatterReplicationExample.rbxl
build-package:
rm -rf {{ build_dir }}
mkdir {{ build_dir }}
wally package --output package.tar
tar -xvf package.tar -C {{ build_dir }}
rm package.tar
lint:
selene {{ project_dir }}
stylua --check {{ project_dir }}
wally-install:
wally install
rojo sourcemap {{ test_project }} -o {{ sourcemap_path }}
wally-package-types --sourcemap {{ sourcemap_path }} {{ packages_dir }}
init:
foreman install
just wally-install
analyze:
curl -s -o {{ global_defs_path }} \
-O https://raw.githubusercontent.com/JohnnyMorganz/luau-lsp/master/scripts/globalTypes.d.lua
rojo sourcemap {{ test_project }} -o {{ sourcemap_path }}
luau-lsp analyze --sourcemap={{ sourcemap_path }} \
--defs={{ global_defs_path }} \
--settings="./.vscode/settings.json" \
--ignore=**/_Index/** \
{{ project_dir }}