-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
58 changed files
with
4,375 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"jsx": true, | ||
"useJSXTextNode": true, | ||
"ecmaVersion": 2018, | ||
"sourceType": "module", | ||
"project": "./tsconfig.json" | ||
}, | ||
"ignorePatterns": [ | ||
"/out" | ||
], | ||
"plugins": [ | ||
"@typescript-eslint", | ||
"roblox-ts", | ||
"prettier" | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:roblox-ts/recommended", | ||
"plugin:prettier/recommended" | ||
], | ||
"rules": { | ||
"prettier/prettier": "warn" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
*.zip | ||
packages/*/Packages | ||
/node_modules | ||
/include | ||
/out | ||
/build | ||
/Packages | ||
/test/Packages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"printWidth": 120, | ||
"tabWidth": 4, | ||
"trailingComma": "all", | ||
"useTabs": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"[lua]": { | ||
"editor.defaultFormatter": "JohnnyMorganz.stylua", | ||
"editor.formatOnSave": true, | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint", | ||
"editor.formatOnSave": true | ||
}, | ||
"editor.codeActionsOnSave": { | ||
"source.addMissingImports": true, | ||
"source.organizeImports": true, | ||
"source.fixAll.eslint": true | ||
}, | ||
"eslint.run": "onType", | ||
"eslint.format.enable": true, | ||
"files.eol": "\n" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
[![CI](https://github.com/Sleitnick/RbxUtil/actions/workflows/ci.yaml/badge.svg)](https://github.com/Sleitnick/RbxUtil/actions/workflows/ci.yaml) | ||
[![Docs](https://github.com/Sleitnick/RbxUtil/actions/workflows/docs.yaml/badge.svg)](https://github.com/Sleitnick/RbxUtil/actions/workflows/docs.yaml) | ||
|
||
# RbxUtil | ||
|
||
| Module | Dependency | Description | | ||
| -- | -- | -- | | ||
| [Comm](https://sleitnick.github.io/RbxUtil/api/Comm) | `Comm = "sleitnick/[email protected]"` | Comm library for remote communication | | ||
| [Component](https://sleitnick.github.io/RbxUtil/api/Component) | `Component = "sleitnick/[email protected]"` | Component class | | ||
| [Concur](https://sleitnick.github.io/RbxUtil/api/Concur) | `Concur = "sleitnick/[email protected]"` | Concurrent task handler | | ||
| [EnumList](https://sleitnick.github.io/RbxUtil/api/EnumList) | `EnumList = "sleitnick/[email protected]"` | Enum List class | | ||
| [Input](https://sleitnick.github.io/RbxUtil/api/Input) | `Input = "sleitnick/[email protected]"` | Basic input classes | | ||
| [Loader](https://sleitnick.github.io/RbxUtil/api/Loader) | `Loader = "sleitnick/[email protected]"` | Requires all modules within a given instance | | ||
| [Log](https://sleitnick.github.io/RbxUtil/api/Log) | `Log = "sleitnick/[email protected]"` | Log class for logging to PlayFab | | ||
| [Net](https://sleitnick.github.io/RbxUtil/api/Net) | `Net = "sleitnick/[email protected]"` | Static networking module | | ||
| [Option](https://sleitnick.github.io/RbxUtil/api/Option) | `Option = "sleitnick/[email protected]"` | Represent optional values in Lua | | ||
| [PID](https://sleitnick.github.io/RbxUtil/api/PID) | `PID = "sleitnick/[email protected]"` | PID Controller class | | ||
| [Quaternion](https://sleitnick.github.io/RbxUtil/api/Quaternion) | `Quaternion = "sleitnick/[email protected]"` | Quaternion class | | ||
| [Ser](https://sleitnick.github.io/RbxUtil/api/Ser) | `Ser = "sleitnick/[email protected]"` | Ser class for serialization and deserialization | | ||
| [Shake](https://sleitnick.github.io/RbxUtil/api/Shake) | `Shake = "sleitnick/[email protected]"` | Shake class for making things shake | | ||
| [Signal](https://sleitnick.github.io/RbxUtil/api/Signal) | `Signal = "sleitnick/[email protected]"` | Signal class | | ||
| [Silo](https://sleitnick.github.io/RbxUtil/api/Silo) | `Silo = "sleitnick/[email protected]"` | State container class | | ||
| [Streamable](https://sleitnick.github.io/RbxUtil/api/Streamable) | `Streamable = "sleitnick/[email protected]"` | Streamable class and StreamableUtil | | ||
| [Symbol](https://sleitnick.github.io/RbxUtil/api/Symbol) | `Symbol = "sleitnick/[email protected]"` | Symbol | | ||
| [TableUtil](https://sleitnick.github.io/RbxUtil/api/TableUtil) | `TableUtil = "sleitnick/[email protected]"` | Table utility functions | | ||
| [TaskQueue](https://sleitnick.github.io/RbxUtil/api/TaskQueue) | `TaskQueue = "sleitnick/[email protected]"` | Batches tasks that occur on the same execution step | | ||
| [Timer](https://sleitnick.github.io/RbxUtil/api/Timer) | `Timer = "sleitnick/[email protected]"` | Timer class | | ||
| [Trove](https://sleitnick.github.io/RbxUtil/api/Trove) | `Trove = "sleitnick/[email protected]"` | Trove class for tracking and cleaning up objects | | ||
| [WaitFor](https://sleitnick.github.io/RbxUtil/api/WaitFor) | `WaitFor = "sleitnick/[email protected]"` | WaitFor class for awaiting instances | | ||
[![CI](https://github.com/Sleitnick/RbxUtil/actions/workflows/ci.yaml/badge.svg)](https://github.com/Sleitnick/RbxUtil/actions/workflows/ci.yaml) | ||
[![Docs](https://github.com/Sleitnick/RbxUtil/actions/workflows/docs.yaml/badge.svg)](https://github.com/Sleitnick/RbxUtil/actions/workflows/docs.yaml) | ||
|
||
# RbxUtil | ||
|
||
| Module | Dependency | Description | | ||
| -- | -- | -- | | ||
| [Comm](https://sleitnick.github.io/RbxUtil/api/Comm) | `Comm = "sleitnick/[email protected]"` | Comm library for remote communication | | ||
| [Component](https://sleitnick.github.io/RbxUtil/api/Component) | `Component = "sleitnick/[email protected]"` | Component class | | ||
| [Concur](https://sleitnick.github.io/RbxUtil/api/Concur) | `Concur = "sleitnick/[email protected]"` | Concurrent task handler | | ||
| [EnumList](https://sleitnick.github.io/RbxUtil/api/EnumList) | `EnumList = "sleitnick/[email protected]"` | Enum List class | | ||
| [Input](https://sleitnick.github.io/RbxUtil/api/Input) | `Input = "sleitnick/[email protected]"` | Basic input classes | | ||
| [Loader](https://sleitnick.github.io/RbxUtil/api/Loader) | `Loader = "sleitnick/[email protected]"` | Requires all modules within a given instance | | ||
| [Log](https://sleitnick.github.io/RbxUtil/api/Log) | `Log = "sleitnick/[email protected]"` | Log class for logging to PlayFab | | ||
| [Net](https://sleitnick.github.io/RbxUtil/api/Net) | `Net = "sleitnick/[email protected]"` | Static networking module | | ||
| [Option](https://sleitnick.github.io/RbxUtil/api/Option) | `Option = "sleitnick/[email protected]"` | Represent optional values in Lua | | ||
| [PID](https://sleitnick.github.io/RbxUtil/api/PID) | `PID = "sleitnick/[email protected]"` | PID Controller class | | ||
| [Quaternion](https://sleitnick.github.io/RbxUtil/api/Quaternion) | `Quaternion = "sleitnick/[email protected]"` | Quaternion class | | ||
| [Sequent](https://sleitnick.github.io/RbxUtil/api/Sequent) | `Sequent = "sleitnick/[email protected]"` | Sequent class | | ||
| [Ser](https://sleitnick.github.io/RbxUtil/api/Ser) | `Ser = "sleitnick/[email protected]"` | Ser class for serialization and deserialization | | ||
| [Shake](https://sleitnick.github.io/RbxUtil/api/Shake) | `Shake = "sleitnick/[email protected]"` | Shake class for making things shake | | ||
| [Signal](https://sleitnick.github.io/RbxUtil/api/Signal) | `Signal = "sleitnick/[email protected]"` | Signal class | | ||
| [Silo](https://sleitnick.github.io/RbxUtil/api/Silo) | `Silo = "sleitnick/[email protected]"` | State container class | | ||
| [Streamable](https://sleitnick.github.io/RbxUtil/api/Streamable) | `Streamable = "sleitnick/[email protected]"` | Streamable class and StreamableUtil | | ||
| [Symbol](https://sleitnick.github.io/RbxUtil/api/Symbol) | `Symbol = "sleitnick/[email protected]"` | Symbol | | ||
| [TableUtil](https://sleitnick.github.io/RbxUtil/api/TableUtil) | `TableUtil = "sleitnick/[email protected]"` | Table utility functions | | ||
| [TaskQueue](https://sleitnick.github.io/RbxUtil/api/TaskQueue) | `TaskQueue = "sleitnick/[email protected]"` | Batches tasks that occur on the same execution step | | ||
| [Timer](https://sleitnick.github.io/RbxUtil/api/Timer) | `Timer = "sleitnick/[email protected]"` | Timer class | | ||
| [Tree](https://sleitnick.github.io/RbxUtil/api/Tree) | `Tree = "sleitnick/[email protected]"` | Utility functions for accessing instances in the game hierarchy | | ||
| [Trove](https://sleitnick.github.io/RbxUtil/api/Trove) | `Trove = "sleitnick/[email protected]"` | Trove class for tracking and cleaning up objects | | ||
| [WaitFor](https://sleitnick.github.io/RbxUtil/api/WaitFor) | `WaitFor = "sleitnick/[email protected]"` | WaitFor class for awaiting instances | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" } | ||
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" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# TypeScript | ||
|
||
Some modules can be used in [roblox-ts](https://roblox-ts.com/). These modules live within their own `@rbxutil` NPM org. | ||
|
||
For a full listing of the available NPM packages, visit the [RbxUtil NPM org](https://www.npmjs.com/org/rbxutil). | ||
|
||
## Installation | ||
|
||
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: | ||
|
||
```bash | ||
$ npm install @rbxutil/quaternion | ||
``` | ||
|
||
## Configuration | ||
|
||
In order for modules from `@rbxutil` to work, two changes will need to be made: | ||
1. Add the modules to the Rojo project file | ||
1. Expose the types to TypeScript | ||
|
||
### Rojo Project | ||
|
||
In the `default.project.json` file, add the `@rbxutil` directory into ReplicatedStorage, right alongside `@rbxts`: | ||
|
||
```json | ||
"node_modules": { | ||
"$className": "Folder", | ||
"@rbxts": { | ||
"$path": "node_modules/@rbxts" | ||
}, | ||
"@rbxutil": { | ||
"$path": "node_modules/@rbxutil" | ||
} | ||
} | ||
``` | ||
|
||
### Types Configuration | ||
|
||
In the `tsconfig.json` file, add the `@rbxutil` directory to the types list. The `@rbxts` org should already be there: | ||
|
||
```json | ||
"typeRoots": ["node_modules/@rbxts", "node_modules/@rbxutil"] | ||
``` | ||
|
||
## Different Org | ||
|
||
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. | ||
|
||
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. | ||
|
||
## Contributing | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.