Skip to content

Commit 2fbd7c3

Browse files
authored
Merge branch 'main' into main
2 parents 6369904 + 3c6124c commit 2fbd7c3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+4375
-155
lines changed

.eslintrc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"parserOptions": {
4+
"jsx": true,
5+
"useJSXTextNode": true,
6+
"ecmaVersion": 2018,
7+
"sourceType": "module",
8+
"project": "./tsconfig.json"
9+
},
10+
"ignorePatterns": [
11+
"/out"
12+
],
13+
"plugins": [
14+
"@typescript-eslint",
15+
"roblox-ts",
16+
"prettier"
17+
],
18+
"extends": [
19+
"eslint:recommended",
20+
"plugin:@typescript-eslint/recommended",
21+
"plugin:roblox-ts/recommended",
22+
"plugin:prettier/recommended"
23+
],
24+
"rules": {
25+
"prettier/prettier": "warn"
26+
}
27+
}

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout code
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919

2020
- name: Install Aftman
2121
uses: ok-nick/setup-aftman@v0
@@ -28,9 +28,9 @@ jobs:
2828
name: Styling
2929
runs-on: ubuntu-latest
3030
steps:
31-
- uses: actions/checkout@v3
32-
- uses: JohnnyMorganz/stylua-action@v2
31+
- uses: actions/checkout@v4
32+
- uses: JohnnyMorganz/stylua-action@v3
3333
with:
3434
token: ${{ secrets.GITHUB_TOKEN }}
35-
version: v0.16.0
35+
version: v0.18.2
3636
args: --check ./modules

.github/workflows/docs.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
name: Build and deploy docs
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
14-
- uses: actions/setup-node@v2
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v3
1515
with:
16-
node-version: "16"
16+
node-version: 18
1717
- run: npm i -g moonwave@latest
1818
- name: Publish
1919
run: |

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
*.zip
22
packages/*/Packages
3+
/node_modules
4+
/include
5+
/out
36
/build
47
/Packages
58
/test/Packages

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"printWidth": 120,
3+
"tabWidth": 4,
4+
"trailingComma": "all",
5+
"useTabs": true
6+
}

.vscode/settings.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
{
2+
"typescript.tsdk": "node_modules/typescript/lib",
23
"[lua]": {
34
"editor.defaultFormatter": "JohnnyMorganz.stylua",
45
"editor.formatOnSave": true,
56
},
7+
"[typescript]": {
8+
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
9+
"editor.formatOnSave": true
10+
},
11+
"editor.codeActionsOnSave": {
12+
"source.addMissingImports": true,
13+
"source.organizeImports": true,
14+
"source.fixAll.eslint": true
15+
},
16+
"eslint.run": "onType",
17+
"eslint.format.enable": true,
618
"files.eol": "\n"
719
}

README.md

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
1-
[![CI](https://github.com/Sleitnick/RbxUtil/actions/workflows/ci.yaml/badge.svg)](https://github.com/Sleitnick/RbxUtil/actions/workflows/ci.yaml)
2-
[![Docs](https://github.com/Sleitnick/RbxUtil/actions/workflows/docs.yaml/badge.svg)](https://github.com/Sleitnick/RbxUtil/actions/workflows/docs.yaml)
3-
4-
# RbxUtil
5-
6-
| Module | Dependency | Description |
7-
| -- | -- | -- |
8-
| [Comm](https://sleitnick.github.io/RbxUtil/api/Comm) | `Comm = "sleitnick/[email protected]"` | Comm library for remote communication |
9-
| [Component](https://sleitnick.github.io/RbxUtil/api/Component) | `Component = "sleitnick/[email protected]"` | Component class |
10-
| [Concur](https://sleitnick.github.io/RbxUtil/api/Concur) | `Concur = "sleitnick/[email protected]"` | Concurrent task handler |
11-
| [EnumList](https://sleitnick.github.io/RbxUtil/api/EnumList) | `EnumList = "sleitnick/[email protected]"` | Enum List class |
12-
| [Input](https://sleitnick.github.io/RbxUtil/api/Input) | `Input = "sleitnick/[email protected]"` | Basic input classes |
13-
| [Loader](https://sleitnick.github.io/RbxUtil/api/Loader) | `Loader = "sleitnick/[email protected]"` | Requires all modules within a given instance |
14-
| [Log](https://sleitnick.github.io/RbxUtil/api/Log) | `Log = "sleitnick/[email protected]"` | Log class for logging to PlayFab |
15-
| [Net](https://sleitnick.github.io/RbxUtil/api/Net) | `Net = "sleitnick/[email protected]"` | Static networking module |
16-
| [Option](https://sleitnick.github.io/RbxUtil/api/Option) | `Option = "sleitnick/[email protected]"` | Represent optional values in Lua |
17-
| [PID](https://sleitnick.github.io/RbxUtil/api/PID) | `PID = "sleitnick/[email protected]"` | PID Controller class |
18-
| [Quaternion](https://sleitnick.github.io/RbxUtil/api/Quaternion) | `Quaternion = "sleitnick/[email protected]"` | Quaternion class |
19-
| [Ser](https://sleitnick.github.io/RbxUtil/api/Ser) | `Ser = "sleitnick/[email protected]"` | Ser class for serialization and deserialization |
20-
| [Shake](https://sleitnick.github.io/RbxUtil/api/Shake) | `Shake = "sleitnick/[email protected]"` | Shake class for making things shake |
21-
| [Signal](https://sleitnick.github.io/RbxUtil/api/Signal) | `Signal = "sleitnick/[email protected]"` | Signal class |
22-
| [Silo](https://sleitnick.github.io/RbxUtil/api/Silo) | `Silo = "sleitnick/[email protected]"` | State container class |
23-
| [Streamable](https://sleitnick.github.io/RbxUtil/api/Streamable) | `Streamable = "sleitnick/[email protected]"` | Streamable class and StreamableUtil |
24-
| [Symbol](https://sleitnick.github.io/RbxUtil/api/Symbol) | `Symbol = "sleitnick/[email protected]"` | Symbol |
25-
| [TableUtil](https://sleitnick.github.io/RbxUtil/api/TableUtil) | `TableUtil = "sleitnick/[email protected]"` | Table utility functions |
26-
| [TaskQueue](https://sleitnick.github.io/RbxUtil/api/TaskQueue) | `TaskQueue = "sleitnick/[email protected]"` | Batches tasks that occur on the same execution step |
27-
| [Timer](https://sleitnick.github.io/RbxUtil/api/Timer) | `Timer = "sleitnick/[email protected]"` | Timer class |
28-
| [Trove](https://sleitnick.github.io/RbxUtil/api/Trove) | `Trove = "sleitnick/[email protected]"` | Trove class for tracking and cleaning up objects |
29-
| [WaitFor](https://sleitnick.github.io/RbxUtil/api/WaitFor) | `WaitFor = "sleitnick/[email protected]"` | WaitFor class for awaiting instances |
1+
[![CI](https://github.com/Sleitnick/RbxUtil/actions/workflows/ci.yaml/badge.svg)](https://github.com/Sleitnick/RbxUtil/actions/workflows/ci.yaml)
2+
[![Docs](https://github.com/Sleitnick/RbxUtil/actions/workflows/docs.yaml/badge.svg)](https://github.com/Sleitnick/RbxUtil/actions/workflows/docs.yaml)
3+
4+
# RbxUtil
5+
6+
| Module | Dependency | Description |
7+
| -- | -- | -- |
8+
| [Comm](https://sleitnick.github.io/RbxUtil/api/Comm) | `Comm = "sleitnick/[email protected]"` | Comm library for remote communication |
9+
| [Component](https://sleitnick.github.io/RbxUtil/api/Component) | `Component = "sleitnick/[email protected]"` | Component class |
10+
| [Concur](https://sleitnick.github.io/RbxUtil/api/Concur) | `Concur = "sleitnick/[email protected]"` | Concurrent task handler |
11+
| [EnumList](https://sleitnick.github.io/RbxUtil/api/EnumList) | `EnumList = "sleitnick/[email protected]"` | Enum List class |
12+
| [Input](https://sleitnick.github.io/RbxUtil/api/Input) | `Input = "sleitnick/[email protected]"` | Basic input classes |
13+
| [Loader](https://sleitnick.github.io/RbxUtil/api/Loader) | `Loader = "sleitnick/[email protected]"` | Requires all modules within a given instance |
14+
| [Log](https://sleitnick.github.io/RbxUtil/api/Log) | `Log = "sleitnick/[email protected]"` | Log class for logging to PlayFab |
15+
| [Net](https://sleitnick.github.io/RbxUtil/api/Net) | `Net = "sleitnick/[email protected]"` | Static networking module |
16+
| [Option](https://sleitnick.github.io/RbxUtil/api/Option) | `Option = "sleitnick/[email protected]"` | Represent optional values in Lua |
17+
| [PID](https://sleitnick.github.io/RbxUtil/api/PID) | `PID = "sleitnick/[email protected]"` | PID Controller class |
18+
| [Quaternion](https://sleitnick.github.io/RbxUtil/api/Quaternion) | `Quaternion = "sleitnick/[email protected]"` | Quaternion class |
19+
| [Sequent](https://sleitnick.github.io/RbxUtil/api/Sequent) | `Sequent = "sleitnick/[email protected]"` | Sequent class |
20+
| [Ser](https://sleitnick.github.io/RbxUtil/api/Ser) | `Ser = "sleitnick/[email protected]"` | Ser class for serialization and deserialization |
21+
| [Shake](https://sleitnick.github.io/RbxUtil/api/Shake) | `Shake = "sleitnick/[email protected]"` | Shake class for making things shake |
22+
| [Signal](https://sleitnick.github.io/RbxUtil/api/Signal) | `Signal = "sleitnick/[email protected]"` | Signal class |
23+
| [Silo](https://sleitnick.github.io/RbxUtil/api/Silo) | `Silo = "sleitnick/[email protected]"` | State container class |
24+
| [Streamable](https://sleitnick.github.io/RbxUtil/api/Streamable) | `Streamable = "sleitnick/[email protected]"` | Streamable class and StreamableUtil |
25+
| [Symbol](https://sleitnick.github.io/RbxUtil/api/Symbol) | `Symbol = "sleitnick/[email protected]"` | Symbol |
26+
| [TableUtil](https://sleitnick.github.io/RbxUtil/api/TableUtil) | `TableUtil = "sleitnick/[email protected]"` | Table utility functions |
27+
| [TaskQueue](https://sleitnick.github.io/RbxUtil/api/TaskQueue) | `TaskQueue = "sleitnick/[email protected]"` | Batches tasks that occur on the same execution step |
28+
| [Timer](https://sleitnick.github.io/RbxUtil/api/Timer) | `Timer = "sleitnick/[email protected]"` | Timer class |
29+
| [Tree](https://sleitnick.github.io/RbxUtil/api/Tree) | `Tree = "sleitnick/[email protected]"` | Utility functions for accessing instances in the game hierarchy |
30+
| [Trove](https://sleitnick.github.io/RbxUtil/api/Trove) | `Trove = "sleitnick/[email protected]"` | Trove class for tracking and cleaning up objects |
31+
| [WaitFor](https://sleitnick.github.io/RbxUtil/api/WaitFor) | `WaitFor = "sleitnick/[email protected]"` | WaitFor class for awaiting instances |

aftman.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
tools = { rojo = "rojo-rbx/rojo@7.2.1" , run-in-roblox = "rojo-rbx/[email protected]" , wally = "UpliftGames/[email protected].1" , selene = "Kampfkarren/[email protected]" , stylua = "JohnnyMorganz/StyLua@0.17.1" }
1+
tools = { rojo = "rojo-rbx/rojo@7.3.0" , run-in-roblox = "rojo-rbx/[email protected]" , wally = "UpliftGames/[email protected].2" , selene = "Kampfkarren/[email protected]" , stylua = "JohnnyMorganz/StyLua@0.18.2" }

default.project.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@
66
"$className": "ReplicatedStorage",
77
"Test": {
88
"$path": "test"
9+
},
10+
"modules": {
11+
"$path": "out"
12+
},
13+
"rbxts_include": {
14+
"$path": "include",
15+
"node_modules": {
16+
"$className": "Folder",
17+
"@rbxts": {
18+
"$path": "node_modules/@rbxts"
19+
}
20+
}
921
}
1022
}
1123
}

docs/ts.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
sidebar_position: 2
3+
---
4+
5+
# TypeScript
6+
7+
Some modules can be used in [roblox-ts](https://roblox-ts.com/). These modules live within their own `@rbxutil` NPM org.
8+
9+
For a full listing of the available NPM packages, visit the [RbxUtil NPM org](https://www.npmjs.com/org/rbxutil).
10+
11+
## Installation
12+
13+
Installing modules works like any other roblox-ts package, except that the prefix will be `@rbxutil`. For instance, to install the quaternion library, run the following command:
14+
15+
```bash
16+
$ npm install @rbxutil/quaternion
17+
```
18+
19+
## Configuration
20+
21+
In order for modules from `@rbxutil` to work, two changes will need to be made:
22+
1. Add the modules to the Rojo project file
23+
1. Expose the types to TypeScript
24+
25+
### Rojo Project
26+
27+
In the `default.project.json` file, add the `@rbxutil` directory into ReplicatedStorage, right alongside `@rbxts`:
28+
29+
```json
30+
"node_modules": {
31+
"$className": "Folder",
32+
"@rbxts": {
33+
"$path": "node_modules/@rbxts"
34+
},
35+
"@rbxutil": {
36+
"$path": "node_modules/@rbxutil"
37+
}
38+
}
39+
```
40+
41+
### Types Configuration
42+
43+
In the `tsconfig.json` file, add the `@rbxutil` directory to the types list. The `@rbxts` org should already be there:
44+
45+
```json
46+
"typeRoots": ["node_modules/@rbxts", "node_modules/@rbxutil"]
47+
```
48+
49+
## Different Org
50+
51+
In order to avoid naming conflicts and namespace cluttering, RbxUtil modules will be placed in their own NPM org (`@rbxutil`). This has been done out of respect for roblox-ts package developers and to allow RbxUtil to grow unbounded by the current default org packages.
52+
53+
For example, there is already a Signal package within the default `@rbxts` org. Also, RbxUtil has many generic names, such as Log and Shake. While these are named to convey their meaning easily, it is best to not clutter the `@rbxts` org with a vast array of such names from a single repository. This naming issue is not an issue for Wally, as Wally uses the author's name as the namespace.
54+
55+
## Contributing
56+
57+
If you find any types that are incorrect, missing, or broken, please feel free to open up a GitHub Issue and/or pull request to address and fix these issues.

0 commit comments

Comments
 (0)