File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load diff This file was deleted.
Original file line number Diff line number Diff line change 2121 "prepare" : " husky || exit 0" ,
2222 "run" : " node packages/cli/bin/cli.mjs" ,
2323 "watch" : " node --watch packages/cli/bin/cli.mjs" ,
24- "docs:build" : " bash scripts/vercel- docs-build .sh" ,
24+ "docs:build" : " bash scripts/docs/main .sh" ,
2525 "changeset" : " changeset" ,
2626 "changeset:version" : " changeset version" ,
2727 "release" : " changeset publish"
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ readonly NODE_REPO=" https://github.com/nodejs/node.git"
5+ readonly SRC_DIR=" node"
6+ readonly OUT_DIR=" out"
7+
8+ cleanup () { rm -rf " $SRC_DIR " ; }
9+ trap cleanup EXIT
10+
11+ tags=$( git ls-remote --tags --refs --sort=' -v:refname' " $NODE_REPO " ' v*' )
12+ LATEST_TAG=$( awk -F/ ' $NF !~ /-/ { print $NF; exit }' <<< " $tags" )
13+
14+ if [[ -z $LATEST_TAG ]]; then
15+ echo " Could not determine the latest nodejs/node release tag" >&2
16+ exit 1
17+ fi
18+
19+ echo " Building docs for nodejs/node $LATEST_TAG "
20+
21+ clone_node_docs () {
22+ rm -rf " $SRC_DIR "
23+ git clone --depth 1 --no-tags --branch " $LATEST_TAG " \
24+ --filter=blob:none --sparse " $NODE_REPO " " $SRC_DIR "
25+ git -C " $SRC_DIR " sparse-checkout set doc lib
26+ }
27+
28+ clone_node_docs &
29+ clone_pid=$!
30+
31+ pnpm install --frozen-lockfile
32+
33+ wait " $clone_pid "
34+
35+ mkdir -p " $OUT_DIR "
36+
37+ node packages/cli/bin/cli.mjs generate \
38+ -t orama-db \
39+ -t legacy-json \
40+ -t llms-txt \
41+ -t html \
42+ -i " ./$SRC_DIR /doc/api/*.md" \
43+ --ignore " ./$SRC_DIR /doc/api/quic.md" \
44+ -o " ./$OUT_DIR " \
45+ -c " ./$SRC_DIR /CHANGELOG.md" \
46+ -v " $LATEST_TAG " \
47+ --type-map " ./$SRC_DIR /doc/type-map.json" \
48+ --index " ./$SRC_DIR /doc/api/index.md" \
49+ --config-file " ./beta/doc-kit.config.mjs" \
50+ --log-level debug
51+
52+ cp " $SRC_DIR " /doc/api/* .md " $OUT_DIR /"
Original file line number Diff line number Diff line change 1+ {
2+ "build" : {
3+ "command" : " bash scripts/deployments/beta/main.sh"
4+ }
5+ }
File renamed without changes.
Original file line number Diff line number Diff line change 1+ {
2+ "build" : {
3+ "command" : " bash scripts/deployments/docs/main.sh"
4+ }
5+ }
Load diff This file was deleted.
Load diff This file was deleted.
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments