This repository has been archived by the owner on Jul 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Dependencies
SquidDev edited this page Jan 5, 2015
·
6 revisions
A basic dependency tree looks like this:
local sources = Dependencies(CurrentDirectory)
sources:Main "Thing.lua"
:Depends "Another"
sources:File "Another.lua"
:Name "Another"
-
Main:
sources:Main(path)
Defines a 'core' file, one which is executed at the end of the combined file -
File:
sources:File(path)
Defines a 'extension' file, which is executed in a sandbox. -
Export:
sources:Export(shouldExport)
Set to true to use globals to store the files instead. -
Combine:
sources:Combine(outputFile)
Combine the dependencies into one file. -
Depends:
sources:Depends(path or alias)
Add a dependency to the main file -
Prerequisite:
sources:Prerequisite(path or alias)
Add a prerequisite to the main file.
Each file can use several options:
-
Depends:
:Depends(path or alias)
This file depends on another file -
Prerequisite:
:Prerequisite(path or alias)
Append a dependency to the beginning of the list. -
Name:
:Name(name)
The variable this file should be assigned to, this automatically sets thealias
to. -
Alias:
:Alias(name)
A name that can be used to refer to this file, cannot be used in conjunction withName
-
Export:
:Export(shouldExport)
Slightly broken, used to define if the file should be exported from the resulting file or not. -
NoWrap:
:NoWrap(noWrap)
Set totrue
to prevent the file being wrapped with_W(...)
ordo...end
.