Skip to content

Commit

Permalink
Add meta-files.md and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
hoontee committed Dec 1, 2023
1 parent a6eea81 commit e82ed1d
Show file tree
Hide file tree
Showing 14 changed files with 60 additions and 24 deletions.
3 changes: 1 addition & 2 deletions docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ export default defineConfig({
collapsed: false,
items: [
{ text: 'Supported Files', link: '/lync/project-format/files/supported-files' },
{ text: 'Script Directives', link: '/lync/project-format/files/script-directives' },
{ text: 'Init Scripts', link: '/lync/project-format/files/init-scripts' },
{ text: 'Scripts', link: '/lync/project-format/files/scripts' },
{ text: 'Meta Files', link: '/lync/project-format/files/meta-files' },
{ text: 'JSON Models', link: '/lync/project-format/files/json-models' },
{ text: 'Excel Tables', link: '/lync/project-format/files/excel-tables' }
Expand Down
4 changes: 2 additions & 2 deletions docs/lync/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ This feature is disabled by default.
* To enable auto updates, run `LYNC CONFIG` and set `AutoUpdate` to `true`.
* To change the update repository, run `LYNC CONFIG` and modify `AutoUpdate_Repo`.

## Lune Dependency for Building to File
[Lune](https://lune-org.github.io/docs/getting-started/1-installation) must be installed for building to file. You must specify the path to your Lune installation in the config file. To do this, run `LYNC CONFIG` and modify `Path_Lune`.
## Lune Dependency
[Lune](https://lune-org.github.io/docs/getting-started/1-installation) must be installed for building to file in `OPEN` and `BUILD` modes. You must specify the path to your Lune installation in the config file. To do this, run `LYNC CONFIG` and modify `Path_Lune`.
2 changes: 1 addition & 1 deletion docs/lync/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Lync uses Roblox plugin API to sync content. Similar file sync tools rely on par
::: tip DISCLAIMER
Does not apply to `OPEN` and `BUILD` modes, which rely on [Lune](https://lune-org.github.io/docs) to build a place file.

See [getting-started/installation](/lync/getting-started/installation#lune-dependency-for-building-to-file).
See [getting-started/installation#lune-dependency](/lync/getting-started/installation#lune-dependency).
:::

### Open Source
Expand Down
2 changes: 1 addition & 1 deletion docs/lync/project-format/files/excel-tables.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Excel Tables
::: danger UNFINISHED
This documentation is unfinished.
:::
# Excel Tables
4 changes: 0 additions & 4 deletions docs/lync/project-format/files/init-scripts.md

This file was deleted.

4 changes: 3 additions & 1 deletion docs/lync/project-format/files/json-models.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# JSON Models
::: danger UNFINISHED
This documentation is unfinished.
:::
# JSON Models

## Syntax
37 changes: 34 additions & 3 deletions docs/lync/project-format/files/meta-files.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,35 @@
# Meta Files
::: danger UNFINISHED
This documentation is unfinished.
:::
Meta Files attach additional data to a file or directory.

They are used in scenarios where it would be desirable to change the properties of something which otherwise cannot be changed from the filesystem.

## Syntax

### File Name
- `*.Meta.JSON` - For files.
- `Init.Meta.JSON` - For directories.

### Keys
- string `className` - Changes the ClassName. Usable only with directories.
- table `properties` - A map of properties to set on the Instance.

## Examples
The most common use case is changing the ClassName of a Folder.

If your project has a directory and you want to change its ClassName, you will create a `Init.Meta.JSON` inside it with:
```json
{
"className": "Configuration"
}
```

Another use case is changing the properties of a Model (`RBXM`/`RBXMX`). Because the file is encoded, it cannot have its properties changed directly.

If your project has `foo.RBXM` (which contains a single Part) and you want to make it a different color, you will create a `foo.Meta.JSON` next to it with:
```json
{
"properties": {
"Color": [ "Color3.fromRGB(82, 132, 145)" ]
}
}
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Script Directives
Add Script Directives to the top of your script to control its [RunContext](https://create.roblox.com/docs/reference/engine/enums/RunContext) or to disable it.
# Scripts
Scripts can be formatted in a few different ways to change their representation in Roblox.

## Script Directives
Add Directives to the top of your script to change its ClassName, control its [RunContext](https://create.roblox.com/docs/reference/engine/enums/RunContext), or to disable it.
::: info Script Directives
| Directive | ClassName | RunContext | Behavior |
|-|-|-|-|
Expand All @@ -10,3 +13,8 @@ Add Script Directives to the top of your script to control its [RunContext](http
| `--@localscript` `--@script:localscript` | [LocalScript](https://create.roblox.com/docs/reference/engine/classes/LocalScript) | - | Runs in legacy script containers dependent on the type of script. |
| `--@disabled` | - | - | Determines whether the script will run or not. |
:::

## Init Scripts
Any file ending in `Init.LUA` or `{parent directory's name}.Init.LUA` will change its parent directory to a script with the contents of the file.

Like all directories, contents inside the parent directory will be parented to the script.
6 changes: 3 additions & 3 deletions docs/lync/project-format/files/supported-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Different file types are synced into the place in different forms.
All forms of Roblox content can be stored on the filesystem and synced.

::: info Supported Files
| Concept | File Extension | Roblox ClassName |
| Concept | File Extension | ClassName |
|-|-|-|
| Folders | any directory | [Folder](https://create.roblox.com/docs/reference/engine/classes/Folder)
| Scripts | `LUA`/`LUAU` | [LuaSourceContainer](https://create.roblox.com/docs/reference/engine/classes/LuaSourceContainer) * |
Expand All @@ -19,7 +19,7 @@ All forms of Roblox content can be stored on the filesystem and synced.
| JSON Models | `*.Model.JSON` | Varies |
| Excel Tables | `*.Excel.JSON` | [ModuleScript](https://create.roblox.com/docs/reference/engine/classes/ModuleScript) |

\* Can be [ModuleScript](https://create.roblox.com/docs/reference/engine/classes/ModuleScript), [Script](https://create.roblox.com/docs/reference/engine/classes/Script), or [LocalScript](https://create.roblox.com/docs/reference/engine/classes/LocalScript) depending on the script run context directive.
\* Can be [ModuleScript](https://create.roblox.com/docs/reference/engine/classes/ModuleScript), [Script](https://create.roblox.com/docs/reference/engine/classes/Script), or [LocalScript](https://create.roblox.com/docs/reference/engine/classes/LocalScript) depending on the Directives present.

See [project-format/files/script-directives](/lync/project-format/files/script-directives).
See [project-format/files/scripts#script-directives](/lync/project-format/files/scripts#script-directives).
:::
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Automated Downloads
::: danger UNFINISHED
This documentation is unfinished.
:::
# Automated Downloads
2 changes: 1 addition & 1 deletion docs/lync/project-format/project-file/automated-jobs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Automated Jobs
::: danger UNFINISHED
This documentation is unfinished.
:::
# Automated Jobs
2 changes: 1 addition & 1 deletion docs/lync/project-format/project-file/packages.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Packages
::: danger UNFINISHED
This documentation is unfinished.
:::
# Packages

::: tip
Complex expressions in property fields may not be supported by other tools, so when releasing packages made with Lync, avoid using math, non constructor functions, and Enums.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Project File Syntax
::: danger UNFINISHED
This documentation is unfinished.
:::
# Project File Syntax
2 changes: 1 addition & 1 deletion docs/lync/project-format/sourcemap.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sourcemap
::: danger UNFINISHED
This documentation is unfinished.
:::
# Sourcemap

0 comments on commit e82ed1d

Please sign in to comment.