Spaces:
Running
Running
Download source/scripts/postbuild.mjs from Segizu/rotoscopia-lab: direct link, hf CLI and curl.
- Browser
- Download file 876 Bytes
-
https://huggingface.co/spaces/Segizu/rotoscopia-lab/resolve/main/source/scripts/postbuild.mjs
- Command line
-
hf download hf://spaces/Segizu/rotoscopia-lab/source/scripts/postbuild.mjs
-
curl -L -o postbuild.mjs https://huggingface.co/spaces/Segizu/rotoscopia-lab/resolve/main/source/scripts/postbuild.mjs
876 Bytes
| // Assemble the deployable Space folder (dist/): built app + docs + source copy for transparency. | |
| 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', 'BROWSER_CHECKLIST.md']) 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', 'README.md', 'NOTICE', 'LICENSE', 'BROWSER_CHECKLIST.md']) cpSync(r(f), r('dist/source/' + f), { recursive: true }); | |
| // public/ without the generated wasm/ (recreated by `npm run copy-wasm`) | |
| cpSync(r('public'), r('dist/source/public'), { recursive: true, filter: (p) => !p.includes('/public/wasm') }); | |
| console.log('dist assembled'); | |