Team Ai
Apppublic

build-small-hackathon/CodeFlow

sourceHugging Facemitupdated 4mo agoView on Hugging Face
10likes
build.sh18 linesDownload Raw Back to build
1#!/usr/bin/env bash2# Rebuild the vendored frontend bundles in ../static/ from scratch.3# Requires Node. Run from this build/ directory:  ./build.sh4set -euo pipefail5cd "$(dirname "$0")"6npm install --no-fund --no-audit \7  @codemirror/state@6 @codemirror/view@6 @codemirror/commands@6 @codemirror/language@6 \8  @codemirror/lang-python@6 @codemirror/lang-javascript@6 @codemirror/lang-java@6 @codemirror/lang-cpp@6 \9  @lezer/highlight@1 @gradio/client@1 esbuild10EB=./node_modules/.bin/esbuild11"$EB" cm-entry.mjs     --bundle --format=iife --global-name=CM6          --minify --outfile=../static/cm.bundle.js12"$EB" gradio-entry.mjs --bundle --format=iife --global-name=GradioClient --minify --platform=browser \13  --external:fs/promises --external:path --external:fs --external:url --external:stream \14  --external:crypto --external:http --external:https --external:os --external:child_process \15  --outfile=../static/gradio-client.js16curl -sL "https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js" -o ../static/mermaid.min.js17echo "Rebuilt static/{cm.bundle.js, gradio-client.js, mermaid.min.js}. (Fonts are vendored separately.)"18