Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docs): Reenable typedoc for aztec-rpc and aztec.js #2452

Merged
merged 13 commits into from
Sep 22, 2023
Merged
Prev Previous commit
Next Next commit
Skip aztec.js browser build in docs
spalladino committed Sep 21, 2023
commit 86cd696fb3fef959e56b5990f0130855bd7b3195
19 changes: 13 additions & 6 deletions docs/scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#!/bin/bash
set -eo pipefail

# Helper function for building packages in yarn project
build_package() {
local package_name="$1"
local build_command="${2:-yarn build}"

echo "Building $package_name..."
(cd "yarn-project/$package_name" && $build_command)
}

# Build script. If run on Netlify, first it needs to compile all yarn-projects
# that are involved in typedoc in order to generate their type information.
if [ -n "$NETLIFY" ]; then
@@ -19,20 +28,18 @@ if [ -n "$NETLIFY" ]; then
mv yarn-project/tsconfig.tmp.json yarn-project/tsconfig.json

# Install deps (maybe we can have netlify download these automatically so they get cached..?)
echo Installing dependencies...
echo Installing yarn-project dependencies...
(cd yarn-project && yarn)

# Build the required projects for typedoc
projects=("aztec-rpc" "aztec.js")
for project in "${projects[@]}"; do
echo "Building $project..."
(cd "yarn-project/$project" && yarn build)
done
build_package "aztec-rpc"
build_package "aztec.js" "yarn build:ts"

# Back to docs site
cd docs

# Install deps
echo Install docs deps...
yarn
fi

1 change: 1 addition & 0 deletions yarn-project/aztec.js/package.json
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@
"build": "yarn clean && tsc -b && webpack",
"build:web": "webpack",
"build:dev": "tsc -b --watch",
"build:ts": "tsc -b",
"clean": "rm -rf ./dest .tsbuildinfo",
"formatting": "run -T prettier --check ./src && run -T eslint ./src",
"formatting:fix": "run -T prettier -w ./src",
5 changes: 4 additions & 1 deletion yarn-project/aztec.js/package.local.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"scripts": {
"build": "yarn clean && tsc -b && webpack"
"build": "yarn clean && tsc -b && webpack",
"build:web": "webpack",
"build:dev": "tsc -b --watch",
"build:ts": "tsc -b"
}
}