# Resource Manifest

## Example

An example resource manifest for a hypothetical resource looks as follows:

{% code title="manifest.toml" %}

```csharp
# Defines version this resource uses
#
# cantankerous | In Development API
manifest_version = "cantankerous"

# Adds files of to the resource content system.
# Any files will be synced to the client unless resource is marked as server only
#
# This directive supports globbing in the filename field.
files = [
    "resources/**/*.*"
]

# Defines a script to be loaded on both sides. The extension determines which script loader will handle the file.
#
# Extension | Loader     | Type                   | Side        | Environments
# .js       | JavaScript | JavaScript source code | Both Sides  | All environments support
# .py       | Python     | Python source code     | Both Sides  | All environments support
# .lua      | Lua        | Lua source code        | Both Sides  | All environments support
# .jar      | JVM        | Compiled JVM code      | Server Only | Not all environments support
scripts = []

# Requires the specified resource to load before the current resource.
dependencies = ["chat"]

[server]
# Defines a script to be loaded on the server side. The extension determines which script loader will handle the file as described in scripts.
scripts = ["server.js"]

# Marks the resource as being server-only. This stops clients from downloading anything of this resource.
# If all resources are marked as server-only the server will accept vanilla connections.
server_only = false

[client]
# Defines a script to be loaded on the client side. The extension determines which script loader will handle the file as described in scripts.
scripts = ["client.js"]
```

{% endcode %}

## 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sandboxpowered.org/scripting-reference/resource-manifest.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
