Changed file extensions of init command from lua to luau (#831)

This commit is contained in:
Barış
2024-01-06 03:00:49 +03:00
committed by GitHub
parent 6adc5eb9fb
commit 269272983b
14 changed files with 15 additions and 10 deletions

View File

@@ -0,0 +1,20 @@
print("test-plugin initializing...")
return function(nextDispatch, entry)
if entry:isDirectory() then
return nextDispatch(entry)
end
local name = entry:fileName()
local instanceName = name:match("(.-)%.moon$")
if instanceName == nil then
return nextDispatch(entry)
end
return rojo.instance({
Name = instanceName,
ClassName = "ModuleScript",
Source = compileMoonScript(entry:contents()),
})
end