PPysolate SpineREAD THE CODE · UNDERSTAND THE SYSTEM
课程与章节
源码索引 / CURRENT IMPLEMENTATION

tools/read-local.sh

10 行 · 点击行号可定位;函数链接随声明位置更新,不手填行号。

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
[[ -f site/dist/index.html ]] || { printf 'Missing built site. Prepare dependencies online, then run make site.
' >&2; exit 1; }
command -v python3 >/dev/null || { printf 'python3 is required for the local static preview.
' >&2; exit 1; }
printf 'Local reading: http://127.0.0.1:%s/ (Ctrl-C to stop; no npm download)
' "${PORT:-4328}"
exec python3 -m http.server "${PORT:-4328}" --bind 127.0.0.1 --directory site/dist