Skip to content

Commit 076da96

Browse files
committed
Generate jsdoc with jsdoc-to-markdown
1 parent 8f27a58 commit 076da96

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

.github/workflows/gh-pages.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ jobs:
4646
- name: Build with Hugo
4747
run: npm run build
4848

49-
- name: Build JSDoc
50-
run: npm run jsdoc
51-
5249
- name: Print public files
5350
run: |
5451
cd public

.github/workflows/test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,3 @@ jobs:
3030
extended: true # Prevent error building site: POSTCSS: failed to transform, see https://gohugo.io/troubleshooting/faq/#i-get-this-feature-is-not-available-in-your-current-hugo-version
3131
- name: Build with Hugo
3232
run: npm run build
33-
- name: Build JSDoc
34-
run: npm run jsdoc

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@
1313
"license": "CC BY-SA 4.0",
1414
"author": "Open Terms Archive",
1515
"scripts": {
16-
"build": "hugo --minify",
16+
"build": "npm run jsdoc && hugo --minify",
1717
"test": "npm run lint:markdown && npm run lint:css && npm run lint:js && npm run test:links",
1818
"pretest:links": "npm run build",
1919
"test:links": "linkinator ./public --recurse --verbosity error",
2020
"lint:markdown": "markdownlint *.md content/**/*.md",
2121
"lint:css": "stylelint \"themes/opentermsarchive/assets/css/*.css\"",
2222
"lint:js": "eslint themes/opentermsarchive/assets/js/",
23-
"start:dev": "hugo serve --watch --logLevel debug --disableFastRender --ignoreCache"
23+
"start:dev": "npm run jsdoc && hugo serve --watch --logLevel debug --disableFastRender --ignoreCache",
24+
"jsdoc": "jsdoc2md --files './node_modules/@opentermsarchive/engine/src/**/*.js' --template scripts/jsdoc/template/node.hbs -g grouped --name-format -d 4 > content/api/node.md"
2425
},
2526
"devDependencies": {
2627
"eslint": "^8.31.0",

0 commit comments

Comments
 (0)