fix(apis/websocket): don't bundle tesseract.js

This commit is contained in:
PalmDevs
2024-06-24 23:33:31 +07:00
parent 3b2596e748
commit 51a6fb65f0
5 changed files with 13 additions and 29 deletions

View File

@@ -1,3 +0,0 @@
import * as fs from 'fs'
fs.cpSync('../../node_modules/tesseract.js', './dist/tesseract.js', { recursive: true })

View File

@@ -35,8 +35,17 @@ If you're looking to build and host the server somewhere else, you can run:
bun bundle
```
The files will be placed in the `dist` directory. **Configurations and `.env` files will NOT be copied automatically.**
You can run these files using the command `bun run index.js`.
The files will be placed in the `dist` directory. **Configurations and `.env` files will NOT be copied automatically.**
To start up the server, you'll need to install `tesseract.js` first.
```sh
bun install tesseract.js
# or
bun install tesseract.js -g
# Run the server
bun run index.js
```
## ⏭️ What's next

View File

@@ -6,7 +6,7 @@
"description": "🧦 WebSocket API server for bots assisting ReVanced",
"main": "dist/index.js",
"scripts": {
"bundle": "bun build src/index.ts --outdir=dist --target=bun && bun run after_build.ts",
"bundle": "bun build src/index.ts --outdir=dist --target=bun -e tesseract.js",
"dev": "bun run src/index.ts --watch",
"build": "bun bundle",
"watch": "bun dev"