-
Notifications
You must be signed in to change notification settings - Fork 282
/
build-docs.sh
11 lines (9 loc) · 1.08 KB
/
build-docs.sh
1
2
3
4
5
6
7
8
9
10
11
COMPILE_DOCS="npx tsc --project docs/tsconfig.docs.json --types react --moduleResolution node --target esNext --module CommonJS && generate-docs --overridePath ./docs/typeOverride.json --input ./src --output ./docs/generated && rm -rf src/**/*.doc.js src/*.doc.js"
COMPILE_STATIC_PAGES="npx tsc docs/staticPages/*.doc.ts --types react --moduleResolution node --target esNext --module CommonJS && generate-docs --isLandingPage --input ./docs/staticPages --output ./docs/generated && rm -rf docs/staticPages/*.doc.js"
if [ "$1" = "isTest" ];
then
COMPILE_DOCS="npx tsc --project docs/tsconfig.docs.json --types react --moduleResolution node --target esNext --module CommonJS && generate-docs --overridePath ./docs/typeOverride.json --input ./src --output ./docs/temp && rm -rf src/**/*.doc.js src/*.doc.js"
COMPILE_STATIC_PAGES="npx tsc docs/staticPages/*.doc.ts --types react --moduleResolution node --target esNext --module CommonJS && generate-docs --isLandingPage --input ./docs/staticPages --output ./docs/temp && rm -rf docs/staticPages/*.doc.js"
fi
eval $COMPILE_DOCS
eval $COMPILE_STATIC_PAGES