chore(scripts/dev): add --prod option

This commit is contained in:
PalmDevs 2025-05-04 16:48:33 +07:00
parent 8dd0d40289
commit 06388fbf2e
No known key found for this signature in database
GPG key ID: 6FAE8F8677ACA8BA

View file

@ -6,6 +6,7 @@ import os from 'os'
import build from './build'
import pkg from '../package.json'
const prod = process.argv.includes('--prod')
const lanHost = process.argv.includes('--lan')
console.info(chalk.redBright(`\nRevenge ${chalk.white(`v${pkg.version}`)}\n`))
@ -42,6 +43,9 @@ const server = Bun.serve({
if (lanHost) console.info(chalk.gray('\u24D8 Listening on all interfaces...'))
else console.info(chalk.gray('\u24D8 Listening locally... Use --lan to listen on all interfaces'))
if (!prod) console.info(chalk.gray('\u24D8 Use --prod to build for production'))
else console.info(chalk.gray('\u24D8 Building for production...'))
console.info(chalk.cyanBright(`\u24D8 Serving on port ${server.port}`))
console.info(chalk.gray('\u24D8 Accessible on:'))