Files
penpot/mcp/scripts/build-types
2026-02-10 12:35:44 +01:00

24 lines
533 B
Bash
Executable File

#!/usr/bin/env bash
SCRIPT_DIR=$(dirname $0);
URL=${PENPOT_PLUGINS_API_DOC_URL:-http://localhost:9090}
pushd $SCRIPT_DIR;
if [[ "$URL" = "http://localhost:9090" ]]; then
pushd ../../plugins
pnpm install
pnpm run build:doc
popd
fi
if [[ "$URL" = "http://localhost:9090" ]]; then
pnpx concurrently --kill-others-on-fail -s last -k \
"caddy file-server --root ../../plugins/dist/doc/ --listen :9090" \
"bash ../types-generator/build $URL";
else
bash ../types-generator/build $URL;
fi
popd