diff --git a/404.html b/404.html index e1a102d6..6fedf23b 100644 --- a/404.html +++ b/404.html @@ -4,7 +4,7 @@
npm install @rbxts/commander
Installing through yarn
may cause errors due to the way dependencies are installed.
It is recommended to use npm
instead to avoid any issues.
yarn add @rbxts/commander
Installing through pnpm
may cause errors due to the way dependencies are installed.
It is recommended to use npm
instead to avoid any issues.
pnpm add @rbxts/commander
Commander needs to be started once on the client and server.
-To start Commander on the client, you'll need to provide some extra options if you want to use +
When using React in development mode (_G.__DEV__
set to true), you must set
+_G.__DEV__
to true before importing Commander.
To start Commander on the client, you'll need to provide some extra options if you want to use its user interface.
CommanderClient.start(
(registry) => {
// Register commands or types here
},
{
// The interface that will be used to interact with Commander
// Commander comes with a default interface, but you can create your own
interface: CommanderInterface(),
// You can also customize the interface by providing options
interface: CommanderInterface({
position: new UDim2(),
size: new UDim2(),
...
})
// The options below are optional
// The default key is F2, but you can change it here
activationKeys: [Enum.KeyCode.F2],
// The maximum terminal and command history length, default length is 1000
historyLength: 1000,
// If you don't want to register built-in types, you can change this option
// This is set to true by default
registerBuiltInTypes: true,
},
).catch((err) => warn("Commander could not be started:", tostring(err)));
CommanderServer.start(
(registry) => {
// Register commands or types here
},
{
// If you don't want to register built-in types, you can change this option
// This is set to true by default.
registerBuiltInTypes: true,
},
).catch((err) => warn("Commander could not be started:", tostring(err)));
The way commands and types are registered is the same on the server and client.
diff --git a/index.html b/index.html index c60a55ef..d9ecb8e6 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@