Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243import { parseArgs } from 'util';import { SveltePlugin } from 'bun-plugin-svelte';
function buildOptions(devMode) { return { conditions: devMode ? [] : ['production'], entrypoints: ['src/skythread.js', 'src/highlight.ts'], outdir: 'dist', format: 'iife', minify: true, sourcemap: true, plugins: [ SveltePlugin({ // When `true`, this plugin will generate development-only checks and other niceties. // When `false`, this plugin will generate production-ready code development: devMode, }) ] };}
async function runBuild(devMode) { let options = buildOptions(devMode); return await Bun.build(options);}
if (import.meta.main) { let { values: options } = parseArgs({ args: Bun.argv, options: { dev: { type: 'boolean' } }, strict: true, allowPositionals: true });
await runBuild(options.dev);}
export { buildOptions, runBuild };