From 3deda3849e546d28331ab66f54b61aab97f8567c Mon Sep 17 00:00:00 2001 From: csantosm <4a.santos@gmail.com> Date: Tue, 29 Mar 2022 12:35:13 +0200 Subject: [PATCH] openvidu-components: Updated doc build --- openvidu-components-angular/generate-docs.sh | 19 +++++++++++++++++++ openvidu-components-angular/package.json | 3 ++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 openvidu-components-angular/generate-docs.sh diff --git a/openvidu-components-angular/generate-docs.sh b/openvidu-components-angular/generate-docs.sh new file mode 100644 index 00000000..763db82d --- /dev/null +++ b/openvidu-components-angular/generate-docs.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# if [[ -z "$BASEHREF_VERSION" ]]; then +# echo "Example of use: \"BASEHREF_VERSION=2.12.0 ${0}\"" 1>&2 +# exit 1 +# fi + +# Replace version from "stable" to the specified one in all TypeDoc links +# grep -rl '/en/stable/' src | xargs sed -i -e 's|/en/stable/|/en/'${BASEHREF_VERSION}'/|g' + +# Generate Compodoc +npm run lib:doc-build + +# Return links to "stable" version +# grep -rl '/en/'${BASEHREF_VERSION}'/' src | xargs sed -i -e 's|/en/'${BASEHREF_VERSION}'/|/en/stable/|g' + +# Clean previous docs from openvidu.io-docs repo and copy new ones +npm run lib:clean-copy + diff --git a/openvidu-components-angular/package.json b/openvidu-components-angular/package.json index de84a3f2..ff5d6086 100644 --- a/openvidu-components-angular/package.json +++ b/openvidu-components-angular/package.json @@ -12,7 +12,8 @@ "lib:test": "ng test openvidu-angular --no-watch --code-coverage", "lib:e2e": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/angular.test.js", "lib:e2e-ci": "cross-env LAUNCH_MODE=CI npm run lib:e2e", - "lib:doc-build": "npx compodoc -p src/doc/tsconfig.doc.json -c src/doc/.compodocrc.json && rm -rf ../../openvidu.io-docs/docs/api/openvidu-angular && cp -r ./docs/openvidu-angular/ ../../openvidu.io-docs/docs/api/openvidu-angular", + "lib:doc-build": "npx compodoc -p src/doc/tsconfig.doc.json -c src/doc/.compodocrc.json", + "lib:clean-copy": "rm -rf ../../openvidu.io-docs/docs/api/openvidu-angular && cp -r ./docs/openvidu-angular/ ../../openvidu.io-docs/docs/api/openvidu-angular", "lib:doc-serve": "npx compodoc -p src/doc/tsconfig.doc.json --watch --serve -c src/doc/.compodocrc.json", "webcomponent:build": "./node_modules/@angular/cli/bin/ng.js build openvidu-webcomponent --configuration production && node ./openvidu-webcomponent-build.js", "webcomponent:serve-testapp": "npx http-server ./e2e/webcomponent-app/",