Files
swarm-assistent/scripts/build.mjs
T
Leonid PershinandCursor e8bb012885 Ship Assistent 0.11.9: esbuild bundle and patch-keys manifest.
Replace split Assets JS with a built bundle and aligned C#/config so SwarmUI loads one script and patch apply stays consistent; drop legacy terse persona and memory seed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 13:58:11 +03:00

26 lines
652 B
JavaScript

import * as esbuild from 'esbuild';
import { existsSync } from 'node:fs';
const watch = process.argv.includes('--watch');
const ctxOpts = {
entryPoints: ['src/main.js'],
outfile: 'Assets/assistent.bundle.js',
bundle: true,
format: 'iife',
target: ['es2020'],
sourcemap: false,
logLevel: 'info',
};
if (watch) {
const ctx = await esbuild.context(ctxOpts);
await ctx.watch();
console.log('watching src/ → Assets/assistent.bundle.js');
} else {
await esbuild.build(ctxOpts);
if (!existsSync('Assets/assistent.bundle.js')) {
process.exit(1);
}
console.log('built Assets/assistent.bundle.js');
}