@@ -14,34 +14,6 @@ package.path = package.path .. ";?/init.lua"
1414-- If this fails, make sure you've run `lua bin/install-dependencies.lua` first!
1515local lemur = require (" modules.lemur" )
1616
17- --[[
18- Collapses ModuleScripts named 'init' into their parent folders.
19-
20- This is the same behavior as the collapsing mechanism from rbxpacker.
21- ]]
22- local function collapse (root )
23- local init = root :FindFirstChild (" init" )
24- if init then
25- init .Name = root .Name
26- init .Parent = root .Parent
27-
28- for _ , child in ipairs (root :GetChildren ()) do
29- child .Parent = init
30- end
31-
32- root :Destroy ()
33- root = init
34- end
35-
36- for _ , child in ipairs (root :GetChildren ()) do
37- if child :IsA (" Folder" ) then
38- collapse (child )
39- end
40- end
41-
42- return root
43- end
44-
4517-- Create a virtual Roblox tree
4618local habitat = lemur .Habitat .new ()
4719
@@ -51,13 +23,11 @@ Root.Name = "Root"
5123
5224-- Load all of the modules specified above
5325for _ , module in ipairs (LOAD_MODULES ) do
54- local container = lemur . Instance . new ( " Folder " , Root )
26+ local container = habitat : loadFromFs ( module [ 1 ] )
5527 container .Name = module [2 ]
56- habitat : loadFromFs ( module [ 1 ], container )
28+ container . Parent = Root
5729end
5830
59- collapse (Root )
60-
6131-- Load TestEZ and run our tests
6232local TestEZ = habitat :require (Root .TestEZ )
6333
0 commit comments