Search…
Resource Manifest
The resource manifest is a file named manifest.toml placed in a resource folder on the server.

Example

An example resource manifest for a hypothetical resource looks as follows:
manifest.toml
1
# Defines version this resource uses
2
#
3
# cantankerous | In Development API
4
manifest_version = "cantankerous"
5
6
# Adds files of to the resource content system.
7
# Any files will be synced to the client unless resource is marked as server only
8
#
9
# This directive supports globbing in the filename field.
10
files = [
11
"resources/**/*.*"
12
]
13
14
# Defines a script to be loaded on both sides. The extension determines which script loader will handle the file.
15
#
16
# Extension | Loader | Type | Side | Environments
17
# .js | JavaScript | JavaScript source code | Both Sides | All environments support
18
# .py | Python | Python source code | Both Sides | All environments support
19
# .lua | Lua | Lua source code | Both Sides | All environments support
20
# .jar | JVM | Compiled JVM code | Server Only | Not all environments support
21
scripts = []
22
23
# Requires the specified resource to load before the current resource.
24
dependencies = ["chat"]
25
26
[server]
27
# Defines a script to be loaded on the server side. The extension determines which script loader will handle the file as described in scripts.
28
scripts = ["server.js"]
29
30
# Marks the resource as being server-only. This stops clients from downloading anything of this resource.
31
# If all resources are marked as server-only the server will accept vanilla connections.
32
server_only = false
33
34
[client]
35
# Defines a script to be loaded on the client side. The extension determines which script loader will handle the file as described in scripts.
36
scripts = ["client.js"]
Copied!

Globbing

Some entry types may support globbing for multiple files. These take a pattern syntax as follows:
Example
Matches
*.js
a.js, b.js (non-recursively)
dir/*.js
dir/a.js, dir/b.js (non-recursively)
**/*.js
dir1/a.js, dir2/b.js, dir1/dir2/c.js
**.js
Same as **/*.js
**/cl_*.js
dir/cl_a.js, etc
Support for globbing is specified under each entry type.
Copy link