Skip to content

Commit

Permalink
chore: fix path prefix of reference generation scripts (#5324)
Browse files Browse the repository at this point in the history
* chore: fix path prefix of reference generation scripts

* fix build step
  • Loading branch information
shahednasser authored and pKorsholm committed Oct 11, 2023
1 parent d9af2b7 commit f554893
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/generate-references.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
run: yarn install
working-directory: docs-util

- name: Build Workspace dependencies
run: yarn build
working-directory: docs-util

- name: Generate Services Reference
run: yarn generate:reference services
working-directory: docs-util/packages/scripts
Expand Down Expand Up @@ -122,6 +126,10 @@ jobs:
run: yarn install
working-directory: docs-util

- name: Build Workspace dependencies
run: yarn build
working-directory: docs-util

- name: Generate Entities Reference
run: yarn generate:reference entities
working-directory: docs-util/packages/scripts
Expand Down Expand Up @@ -167,6 +175,10 @@ jobs:
run: yarn install
working-directory: docs-util

- name: Build Workspace dependencies
run: yarn build
working-directory: docs-util

- name: Generate Services Reference
run: yarn generate:reference js-client
working-directory: docs-util/packages/scripts
Expand Down
2 changes: 1 addition & 1 deletion docs-util/packages/typedoc-config/entities.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const path = require("path")
const globalTypedocOptions = require("./base")

const pathPrefix = path.join(__dirname, "..", "..")
const pathPrefix = path.join(__dirname, "..", "..", "..")

module.exports = {
...globalTypedocOptions,
Expand Down
2 changes: 1 addition & 1 deletion docs-util/packages/typedoc-config/js-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const path = require("path")
const globalTypedocOptions = require("./base")

const pathPrefix = path.join(__dirname, "..", "..")
const pathPrefix = path.join(__dirname, "..", "..", "..")

module.exports = {
...globalTypedocOptions,
Expand Down
2 changes: 1 addition & 1 deletion docs-util/packages/typedoc-config/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const path = require("path")
const globalTypedocOptions = require("./base")

const pathPrefix = path.join(__dirname, "..", "..")
const pathPrefix = path.join(__dirname, "..", "..", "..")

module.exports = {
...globalTypedocOptions,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import { MarkdownTheme } from "../../theme"
import * as Handlebars from "handlebars"
import { SectionKey } from "../../types"

export default function (theme: MarkdownTheme) {
Handlebars.registerHelper(
"sectionEnabled",
function (sectionName: string): boolean {
const { sections } = theme.getFormattingOptionsForLocation()

return !sections || !(sectionName in sections) || sections[sectionName]
return (
!sections ||
!(sectionName in sections) ||
sections[sectionName as SectionKey]
)
}
)
}

0 comments on commit f554893

Please sign in to comment.