mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-11 13:56:15 +00:00
chore: use alternative ways to bundle
This commit is contained in:
23
apis/websocket/scripts/build.ts
Normal file
23
apis/websocket/scripts/build.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { createLogger } from '@revanced/bot-shared'
|
||||
import { cp } from 'fs/promises'
|
||||
|
||||
async function build(): Promise<void> {
|
||||
const logger = createLogger()
|
||||
|
||||
logger.info('Building Tesseract.js worker...')
|
||||
await Bun.build({
|
||||
entrypoints: ['../../node_modules/tesseract.js/src/worker-script/node/index.js'],
|
||||
target: 'bun',
|
||||
outdir: './dist/worker',
|
||||
})
|
||||
|
||||
logger.info('Building WebSocket API...')
|
||||
await Bun.build({
|
||||
entrypoints: ['./src/index.ts'],
|
||||
outdir: './dist',
|
||||
target: 'bun',
|
||||
})
|
||||
}
|
||||
|
||||
await build()
|
||||
await cp('config.json', 'dist/config.json')
|
||||
Reference in New Issue
Block a user