Skip to content
Draft
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
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ nor legally binding.

## Setting up a Workspace

LiquidBounce uses Gradle; to make sure that it is installed properly, you can
check [Gradle's website](https://gradle.org/install/). It also requires [Node.js](https://nodejs.org) to be installed for

LiquidBounce uses Gradle, to make sure that it is installed properly you can
check [Gradle's website](https://gradle.org/install/). It also requires [Bun](https://bun.sh) to be installed for
our [theme](https://github.com/CCBlueX/LiquidBounce/tree/nextgen/src-theme).

1. Clone the repository using `git clone --recurse-submodules https://github.com/CCBlueX/LiquidBounce`.
Expand Down
17 changes: 8 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
*/

import com.github.gradle.node.npm.task.NpmTask
import com.github.gradle.node.task.NodeTask
import com.github.gradle.node.bun.task.BunTask
import groovy.json.JsonOutput
import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask
import org.gradle.kotlin.dsl.support.listFilesOrdered
Expand Down Expand Up @@ -269,18 +268,18 @@ tasks.processResources {

// The following code will include the theme into the build

tasks.register<NpmTask>("npmInstallTheme") {
tasks.register<BunTask>("bunInstallTheme") {
workingDir = file("src-theme")
args.set(listOf("i"))
doLast {
logger.info("Successfully installed dependencies for theme")
}
inputs.files("src-theme/package.json", "src-theme/package-lock.json")
inputs.files("src-theme/package.json", "src-theme/bun.lock")
outputs.dir("src-theme/node_modules")
}

tasks.register<NpmTask>("buildTheme") {
dependsOn("npmInstallTheme")
tasks.register<BunTask>("buildTheme") {
dependsOn("bunInstallTheme")
workingDir = file("src-theme")
args.set(listOf("run", "build"))
doLast {
Expand All @@ -289,15 +288,15 @@ tasks.register<NpmTask>("buildTheme") {

inputs.files(
"src-theme/package.json",
"src-theme/package-lock.json",
"src-theme/bun.lock",
"src-theme/bundle.cjs",
"src-theme/rollup.config.js"
)
inputs.dir("src-theme/src")
outputs.dir("src-theme/dist")
}

tasks.register<NodeTask>("bundleTheme") {
tasks.register<BunTask>("bundleTheme") {
dependsOn("buildTheme")
workingDir = file("src-theme")
script = file("src-theme/bundle.cjs")
Expand All @@ -308,7 +307,7 @@ tasks.register<NodeTask>("bundleTheme") {
// Incremental stuff
inputs.files(
"src-theme/package.json",
"src-theme/package-lock.json",
"src-theme/bun.lock",
"src-theme/bundle.cjs",
"src-theme/rollup.config.js"
)
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
libs = with pkgs; [
temurin-bin
pciutils
nodejs_24
bun
libpulseaudio
libGL
glfw
Expand Down
11 changes: 4 additions & 7 deletions src-theme/.github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,14 @@ jobs:
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Install dependencies
run: npm install
run: bun install

- name: Build project
run: npm run build
run: bun run build

- name: Create dist archive
run: zip -r ${{ env.ZIP_NAME }}.zip dist/
Expand Down
8 changes: 4 additions & 4 deletions src-theme/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ This directory contains the source code of LiquidBounce's default theme built wi
## Development

### Prerequisites
- [Node.js](https://nodejs.org/en) (latest or stable version)
- [Bun](https://bun.com) (latest version)

### Setup

1. **Install dependencies**
```bash
npm install
bun install
```

2. **Configure development mode**
Expand All @@ -21,7 +21,7 @@ This directory contains the source code of LiquidBounce's default theme built wi

4. **Start development server**
```bash
npm run dev
bun run dev
```

5. **Set theme in client**
Expand All @@ -38,7 +38,7 @@ To build the theme for production use, follow these steps:

2. **Build the theme**
```bash
npm run build
bun run build
```

3. **Locate build output**
Expand Down
Loading
Loading