Fix compile script paths
This commit is contained in:
parent
f4aa8a923a
commit
61cb1670ff
|
|
@ -0,0 +1 @@
|
||||||
|
/processed
|
||||||
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
2013-related scripts, tools, and other goodies
|
2013-related scripts, tools, and other goodies
|
||||||
|
|
||||||
After installing Aftman and running `aftman install`, run `lune run compile.luau` to compile the corescripts and libraries from this directory to ./corescripts/processed.
|
After installing Aftman and running `aftman install`, run `lune run compile.luau` to compile the corescripts and libraries from this directory to ./processed.
|
||||||
|
|
|
||||||
22
compile.luau
22
compile.luau
|
|
@ -22,15 +22,9 @@ local libraryCores = {
|
||||||
local otherCores = {}
|
local otherCores = {}
|
||||||
local plugins = {}
|
local plugins = {}
|
||||||
|
|
||||||
-- Allow for running from the base or corescripts directories
|
local normalCoresDir = "./luau"
|
||||||
local cwd = process.cwd
|
local normalPluginsDir = "./terrain plugins"
|
||||||
local fromCoresDir = not not string.match(cwd, "corescripts/$")
|
local outputDir = "./processed"
|
||||||
local coresDir = if fromCoresDir then "." else "./corescripts"
|
|
||||||
|
|
||||||
-- local normalCoresDir = if fromCoresDir then "./luau" else "./corescripts/luau"
|
|
||||||
local normalCoresDir = `{coresDir}/luau`
|
|
||||||
local normalPluginsDir = `{coresDir}/terrain plugins`
|
|
||||||
local outputDir = `{coresDir}/processed`
|
|
||||||
|
|
||||||
for _, core in ipairs(fs.readDir(normalCoresDir)) do
|
for _, core in ipairs(fs.readDir(normalCoresDir)) do
|
||||||
table.insert(
|
table.insert(
|
||||||
|
|
@ -43,9 +37,7 @@ for _, core in ipairs(fs.readDir(normalPluginsDir)) do
|
||||||
table.insert(plugins, core)
|
table.insert(plugins, core)
|
||||||
end
|
end
|
||||||
|
|
||||||
local pluginsDir = if fromCoresDir
|
local pluginsDir = "./Client deployer" -- not here but.. ya get the idea
|
||||||
then "../Client deployer"
|
|
||||||
else "./Client deployer"
|
|
||||||
|
|
||||||
local function processCores(
|
local function processCores(
|
||||||
scripts: { string },
|
scripts: { string },
|
||||||
|
|
@ -54,9 +46,7 @@ local function processCores(
|
||||||
config: "lines" | "dense",
|
config: "lines" | "dense",
|
||||||
libraries: boolean?
|
libraries: boolean?
|
||||||
)
|
)
|
||||||
local configFile = if fromCoresDir
|
local configFile = `{config}.json5`
|
||||||
then `../{config}.json5`
|
|
||||||
else `{config}.json5`
|
|
||||||
|
|
||||||
local w = waiter(#scripts)
|
local w = waiter(#scripts)
|
||||||
|
|
||||||
|
|
@ -70,7 +60,7 @@ local function processCores(
|
||||||
"process",
|
"process",
|
||||||
"-c",
|
"-c",
|
||||||
configFile,
|
configFile,
|
||||||
`{coresDir}/{startDir}/{core}`,
|
`./{startDir}/{core}`,
|
||||||
`{endDir}/{newCore}`,
|
`{endDir}/{newCore}`,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue