Spaces:
Running
Running
Download tui/scripts/sync-install-extras.mjs from Leon4gr45/brain: direct link, hf CLI and curl.
- Browser
- Download file 881 Bytes
-
https://huggingface.co/spaces/Leon4gr45/brain/resolve/main/tui/scripts/sync-install-extras.mjs
- Command line
-
hf download hf://spaces/Leon4gr45/brain/tui/scripts/sync-install-extras.mjs
-
curl -L -o sync-install-extras.mjs https://huggingface.co/spaces/Leon4gr45/brain/resolve/main/tui/scripts/sync-install-extras.mjs
881 Bytes
| import { mkdirSync, readFileSync, writeFileSync } from "node:fs"; | |
| import { dirname, resolve } from "node:path"; | |
| import { fileURLToPath } from "node:url"; | |
| const here = dirname(fileURLToPath(import.meta.url)); | |
| const repoRoot = resolve(here, "..", ".."); | |
| const sourcePath = resolve(repoRoot, "scripts", "install_extras.py"); | |
| const targetPath = resolve(here, "..", "src", "embedded", "install-extras-script.ts"); | |
| const script = readFileSync(sourcePath, "utf8"); | |
| mkdirSync(dirname(targetPath), { recursive: true }); | |
| const out = `// Auto-generated from scripts/install_extras.py — do not edit by hand. | |
| // Regenerate with: npm run sync:install-extras (also runs as prebuild). | |
| export const INSTALL_EXTRAS_SCRIPT = ${JSON.stringify(script)}; | |
| `; | |
| writeFileSync(targetPath, out, "utf8"); | |
| console.log(`Synced ${sourcePath} → ${targetPath} (${script.length} bytes)`); | |