mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Changed file extensions of init command from lua to luau (#831)
This commit is contained in:
parent
6adc5eb9fb
commit
269272983b
14 changed files with 15 additions and 10 deletions
20
test-projects/plugins/test-plugin.luau
Normal file
20
test-projects/plugins/test-plugin.luau
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue