Files
rojo/plugin/src/init.server.lua
boatbomber 0f8e1625d5 Stylua formatting (#785)
Uses Stylua to format all existing Lua files, and adds a CI check in
`lint` to pin this improvement. Excludes formatting dependencies, of
course.
2023-09-18 15:39:46 -07:00

33 lines
700 B
Lua

if not plugin then
return
end
local Rojo = script:FindFirstAncestor("Rojo")
local Packages = Rojo.Packages
local Log = require(Packages.Log)
local Roact = require(Packages.Roact)
local Settings = require(script.Settings)
local Config = require(script.Config)
local App = require(script.App)
Log.setLogLevelThunk(function()
return Log.Level[Settings:get("logLevel")] or Log.Level.Info
end)
local app = Roact.createElement(App, {
plugin = plugin,
})
local tree = Roact.mount(app, game:GetService("CoreGui"), "Rojo UI")
plugin.Unloading:Connect(function()
Roact.unmount(tree)
end)
if Config.isDevBuild then
local TestEZ = require(script.Parent.TestEZ)
require(script.runTests)(TestEZ)
end