mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-21 13:15:50 +00:00
Changed file extensions of init command from lua to luau (#831)
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user