Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions pages/guides/bun.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: bun
---

# bun

bun is a fast and disk space efficient package manager, serving as an alternative to npm, pnpm and yarn.

- Open a command-line terminal (e.g. Terminal, Command Prompt).
- Enter `curl -fsSL https://bun.sh/install | bash` to install bun on linux.
- Enter `powershell -c "irm bun.sh/install.ps1 | iex"` to insall bun on windows.
- You can install dependencies with bun using `bun i`.

You can reference `package.json` files for available scripts, i.e.

```json
"scripts": {
"build": "bun run build.js",
"watch": "bun run build.js --watch",
"format": "bun run biome format --write",
"lint": "bun run biome lint --write"
}
```

Using the example above `bun run build` will run the build script for the given package.
11 changes: 0 additions & 11 deletions pages/guides/nodejs.mdx

This file was deleted.

26 changes: 0 additions & 26 deletions pages/guides/pnpm.mdx

This file was deleted.

10 changes: 5 additions & 5 deletions pages/ox_core.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ We **strongly** recommend referring to [Guides](../guides) to setup necessary de

### Download the latest [release](https://github.com/communityox/ox_core/releases/latest) or build the source code.

- Setup [Git](../guides/git), [Node.js](../guides/nodejs), and [pnpm](../guides/pnpm).
- Setup [Git](../guides/git), and [bun](../guides/bun).
- Download and setup [MariaDB 11.4+](https://mariadb.com/downloads/community/community-server/).
- Run the following commands in your CLI (e.g. Terminal, Command Prompt).

```bash
git clone https://github.com/communityox/ox_core.git
cd ox_core
pnpm i
pnpm build
bun i
bun run build
```

### Install optional dependencies.
Expand Down Expand Up @@ -83,7 +83,7 @@ To use ox_core with your JavaScript resources you'll need to use our npm package
To get started, try our [fivem-typescript-boilerplate](https://github.com/communityox/fivem-typescript-boilerplate) and install the ox_core package.

```bash
pnpm i @communityox/ox_core
bun i @communityox/ox_core
```

## Config
Expand All @@ -96,7 +96,7 @@ These convars should use the `setr` command to be read by clients.

- `ox:debug`
- Default: `false`
- Enables debug messages and commands. Also allows players to have the same identifiers. Enabled by default when using `pnpm watch`.
- Enables debug messages and commands. Also allows players to have the same identifiers. Enabled by default when using `bun run watch`.
- `ox:characterSlots`
- Default: `1`
- Sets the number of character slots available for character selection resources (e.g. ox_charselect).
Expand Down
6 changes: 3 additions & 3 deletions pages/ox_doorlock.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A door management resource that can be used standalone or alongside ox_core, qbx

<Callout type="info">

We **strongly** recommend referring to [Guides](../guides) for setting up Git, Node.js, and pnpm.
We **strongly** recommend referring to [Guides](../guides) for setting up Git, and bun.

</Callout>

Expand All @@ -26,8 +26,8 @@ We **strongly** recommend referring to [Guides](../guides) for setting up Git, N
```bash
git clone https://github.com/communityox/ox_doorlock.git
cd ox_doorlock/web
pnpm i
pnpm build
bun i
bun run build
```

### Install optional dependencies.
Expand Down
6 changes: 3 additions & 3 deletions pages/ox_inventory.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ If you are unwilling or incapable of resolving incompatibilities, do not install

<Callout type="info">

We **strongly** recommend referring to [Guides](../guides) for setting up Git, Node.js, and pnpm.
We **strongly** recommend referring to [Guides](../guides) for setting up Git, and bun.

</Callout>

Expand All @@ -33,8 +33,8 @@ We **strongly** recommend referring to [Guides](../guides) for setting up Git, N
```bash
git clone https://github.com/communityox/ox_inventory.git
cd ox_inventory/web
pnpm i
pnpm build
bun i
bun run build
```

### Install optional dependencies
Expand Down
24 changes: 9 additions & 15 deletions pages/ox_lib.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A standalone library for providing easily reusable code as importable modules an

<Callout type="info">

We **strongly** recommend referring to [Guides](../guides) for setting up Git, Node.js, and pnpm.
We **strongly** recommend referring to [Guides](../guides) for setting up Git, and bun.

</Callout>

Expand All @@ -23,8 +23,8 @@ We **strongly** recommend referring to [Guides](../guides) for setting up Git, N
```bash
git clone https://github.com/communityox/ox_lib.git
cd ox_lib/web
pnpm i
pnpm build
bun i
bun run build
```

### Config
Expand Down Expand Up @@ -144,24 +144,18 @@ If you wish to edit any of the UI elements you will need to download the _source
</Callout>
**Requirements:**

- [Node.js (LTS)](https://nodejs.org/)
- pnpm
- bun

**Installing Node.js:**
**Installing bun:**

- Download the LTS version of Node.js.
- Go through the install and make sure you install all of the features.
- Run node --version in cmd and make sure that it gives you the version number. If it doesn't then you didn't install it correctly.

**Installing pnpm:**

- After installing NodeJS you can install pnpm by running `npm install -g pnpm`.
- Install bun using `curl -fsSL https://bun.sh/install | bash` for linux
- Install bun using `powershell -c "irm bun.sh/install.ps1 | iex"` for windows

**Building the UI:**

- cd into the web directory.
- run `pnpm i` to install the dependencies.
- run `pnpm build` to build the source files.
- run `bun i` to install the dependencies.
- run `bun run build` to build the source files.

<Callout type="info">
When working in the browser you can run `pnpm start`, which supports hot reloads meaning that
Expand Down
2 changes: 1 addition & 1 deletion pages/ox_target.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A performant and flexible standalone targeting resource or "third-eye", with add

<Callout type="info">

We **strongly** recommend referring to [Guides](../guides) for setting up Git, Node.js, and pnpm.
We **strongly** recommend referring to [Guides](../guides) for setting up Git, and bun.

</Callout>

Expand Down
3 changes: 3 additions & 0 deletions pages/oxmysql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ yarn add @communityox/oxmysql

# With npm
npm install @communityox/oxmysql

# With bun
bun install @communityox/oxmysql
```

Import the oxmysql object into your resource.
Expand Down