Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 7 additions & 15 deletions .github/workflows/deploy-vitepress-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,15 @@ jobs:
cache: npm
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Copy documentation package to isolated directory
run: |
# Create isolated directory for documentation
# So, that API.json will be build from the NPM packages,
# and not from workspace packages
mkdir -p ${{ runner.temp }}/isolated-docs
cp -r internal/documentation/. ${{ runner.temp }}/isolated-docs/
- name: Install documentation dependencies from NPM
working-directory: ${{ runner.temp }}/isolated-docs
- name: Install dependencies
run: npm ci --engine-strict
- name: Fetch gh-pages branch
run: git fetch origin gh-pages --depth=1
- name: generate CLI doc
working-directory: ${{ runner.temp }}/isolated-docs
working-directory: internal/documentation
run: npm run generate-cli-doc
- name: Build vitepress build
working-directory: ${{ runner.temp }}/isolated-docs
working-directory: internal/documentation
run: |
# The base output
npm run build:vitepress -- --base="/${{ github.event.repository.name }}/${DOC_VERSION}/"
Expand All @@ -65,7 +57,7 @@ jobs:
npm run build:vitepress -- --base="/${{ github.event.repository.name }}/${DOC_ALIAS}/" --outDir="dist-${DOC_ALIAS}"
npm run build:assets -- ./dist-${DOC_ALIAS}
- name: Build jsdoc
working-directory: ${{ runner.temp }}/isolated-docs
working-directory: internal/documentation
run: npm run jsdoc-generate
# TODO: Skip for now deployment of the schema until we do a Schema Version 5 release
# - name: Build Sch3 |
Expand All @@ -85,16 +77,16 @@ jobs:
rm -rf ./gh-pages/${DOC_ALIAS}

# Main version route
cp -R ${{ runner.temp }}/isolated-docs/dist ./gh-pages/${DOC_VERSION}/
cp -R internal/documentation/dist ./gh-pages/${DOC_VERSION}/

# Alias route. E.g., next, latest, stable, etc.
# For vitepress must be a copy with different config, not a symlink
cp -R ${{ runner.temp }}/isolated-docs/dist-${DOC_ALIAS} ./gh-pages/${DOC_ALIAS}/
cp -R internal/documentation/dist-${DOC_ALIAS} ./gh-pages/${DOC_ALIAS}/
# Symlink the api docs to avoid duplication
ln -s ../${DOC_VERSION}/api ./gh-pages/${DOC_ALIAS}/api

# TODO: Enable when v5 release is done
# cp ${{ runner.temp }}/isolated-docs/scripts/resources/custom404.html ./gh-pages/404.html
# cp internal/documentation/scripts/resources/custom404.html ./gh-pages/404.html
- name: Publish Docs
run: |
cd ./gh-pages
Expand Down
71 changes: 71 additions & 0 deletions internal/documentation/jsdoc/jsdoc-workspace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"tags": {
"allowUnknownTags": false
},
"source": {
"include": ["jsdoc/index.md", "../../packages"],
"exclude": [
"../../packages/builder/lib/lbt/utils/JSTokenizer.js",
"../../packages/builder/lib/processors/jsdoc/lib/ui5/plugin.js",
"../../packages/builder/lib/processors/jsdoc/lib/ui5/template/publish.js",
"../../packages/builder/lib/processors/jsdoc/lib/ui5/template/utils/versionUtil.js"
],
"includePattern": "packages/[^/]+/(lib/.+|index)\\.js$",
"excludePattern": "packages/.*/node_modules"
},
"plugins": [
"jsdoc/jsdoc-plugin.cjs"
],
"opts": {
"encoding": "utf8",
"destination": "dist/api/",
"recurse": true,
"verbose": true,
"access": "public"
},
"templates": {
"cleverLinks": false,
"monospaceLinks": false,
"default": {
"useLongnameInNav": true,
"layoutFile": "jsdoc/templates/layout.tmpl",
"staticFiles": {
"include": ["jsdoc/templates/custom.css"]
}
}
},
"openGraph": {
"title": "UI5 CLI - API Reference",
"type": "website",
"image": "https://ui5.github.io/cli/v4/images/UI5_logo_wide.png",
"site_name": "UI5 CLI - API Reference",
"url": "https://ui5.github.io/cli/v4/"
Comment thread
d3xter666 marked this conversation as resolved.
Outdated
},
"docdash": {
"sectionOrder": [
"Modules",
"Namespaces",
"Classes",
"Externals",
"Events",
"Mixins",
"Tutorials",
"Interfaces"
],
"meta": {
"title": "UI5 CLI - API Reference",
"description": "UI5 CLI - API Reference",
"keyword": "openui5 sapui5 ui5 build development tool api reference"
},
"search": true,
"wrap": true,
"menu": {
"GitHub": {
"href": "https://github.com/UI5/cli",
"target": "_blank",
"class": "menu-item",
"id": "github_link"
}
}
}
}
14 changes: 7 additions & 7 deletions internal/documentation/jsdoc/jsdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"allowUnknownTags": false
},
"source": {
"include": ["jsdoc/index.md"],
"include": ["jsdoc/index.md", "../../node_modules/@ui5"],
"exclude": [
"node_modules/@ui5/builder/lib/lbt/utils/JSTokenizer.js",
"node_modules/@ui5/builder/lib/processors/jsdoc/lib/ui5/plugin.js",
"node_modules/@ui5/builder/lib/processors/jsdoc/lib/ui5/template/publish.js",
"node_modules/@ui5/builder/lib/processors/jsdoc/lib/ui5/template/utils/versionUtil.js"
"../../node_modules/@ui5/builder-npm/lib/lbt/utils/JSTokenizer.js",
"../../node_modules/@ui5/builder-npm/lib/processors/jsdoc/lib/ui5/plugin.js",
"../../node_modules/@ui5/builder-npm/lib/processors/jsdoc/lib/ui5/template/publish.js",
"../../node_modules/@ui5/builder-npm/lib/processors/jsdoc/lib/ui5/template/utils/versionUtil.js"
],
"includePattern": "node_modules/@ui5/[^\/]*/(lib/.+|index)\\.js$",
"excludePattern": "node_modules/@ui5/.*/node_modules/@ui5"
"includePattern": "@ui5/[^/]*-npm/(lib/.+|index)\\.js$",
"excludePattern": "@ui5/.*/node_modules/@ui5"
},
"plugins": [
"jsdoc/jsdoc-plugin.cjs"
Expand Down
15 changes: 8 additions & 7 deletions internal/documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@
"scripts": {
"start": "vitepress dev --open",
"lint": "eslint .",
"depcheck": "depcheck --ignores @ui5/documentation,vitepress,docdash,jsdoc,open-cli,handlebars,@types/node,@ui5/webcomponents,autoprefixer,cssnano,@ui5/cli,@ui5/builder,@ui5/fs,@ui5/logger,@ui5/project,@ui5/server,@theme/components",
"depcheck": "depcheck --ignores @ui5/documentation,vitepress,docdash,jsdoc,open-cli,handlebars,@types/node,@ui5/webcomponents,autoprefixer,cssnano,@ui5/cli-npm,@ui5/builder-npm,@ui5/fs-npm,@ui5/logger-npm,@ui5/project-npm,@ui5/server-npm,@theme/components",
"dev": "vitepress dev",
"build:vitepress": "vitepress build",
"build:assets": "sh -c 'DEST_DIR=${1:-./dist}; cp -r ./docs/images \"$DEST_DIR/images\"' --",
"preview": "vitepress preview --port 8080",
"jsdoc": "npm run jsdoc-generate && open-cli dist/api/index.html",
"jsdoc-generate": "jsdoc -c jsdoc/jsdoc.json -t $(node -p 'path.dirname(require.resolve(\"docdash\"))') ./ || (echo 'Error during JSDoc generation! Check log.' && exit 1)",
"jsdoc-generate-workspace": "jsdoc -c jsdoc/jsdoc-workspace.json -t $(node -p 'path.dirname(require.resolve(\"docdash\"))') ./ || (echo 'Error during JSDoc generation! Check log.' && exit 1)",
"generate-cli-doc": "node ./scripts/generateCliDoc.js"
},
"dependencies": {
Expand All @@ -45,12 +46,12 @@
"vue": "^3.4.38"
},
"devDependencies": {
"@ui5/builder": "^4",
"@ui5/cli": "^4",
"@ui5/fs": "^4",
"@ui5/logger": "^4",
"@ui5/project": "^4",
"@ui5/server": "^4",
"@ui5/builder-npm": "npm:@ui5/builder@^4.0.11",
"@ui5/cli-npm": "npm:@ui5/cli@^4.0.26",
"@ui5/fs-npm": "npm:@ui5/fs@^4.0.2",
"@ui5/logger-npm": "npm:@ui5/logger@^4.0.2",
"@ui5/project-npm": "npm:@ui5/project@^4.0.6",
"@ui5/server-npm": "npm:@ui5/server@^4.0.7",
"docdash": "^2.0.2",
"jsdoc": "^4.0.4",
"open-cli": "^8.0.0",
Expand Down
Loading