buscador-visual / source /scripts /postbuild.mjs
Segizu's picture
Buscador Visual: b煤squeda por texto/imagen/regi贸n con SigLIP 2 en el navegador
d18636b verified
Raw History Blame Contribute Delete
611 Bytes
// Ensambla dist/ (carpeta desplegable del Space): app compilada + docs + copia del c贸digo fuente.
import { cpSync, mkdirSync, rmSync } from 'node:fs';
const r = (p) => new URL('../' + p, import.meta.url).pathname;
for (const f of ['README.md', 'NOTICE', 'LICENSE']) cpSync(r(f), r('dist/' + f));
rmSync(r('dist/source'), { recursive: true, force: true });
mkdirSync(r('dist/source'), { recursive: true });
for (const f of ['src', 'tests', 'scripts', 'package.json', 'package-lock.json', 'vite.config.js', 'index.html']) cpSync(r(f), r('dist/source/' + f), { recursive: true });
console.log('dist assembled');