Skip to content

Commit 6d4bb5e

Browse files
authored
chore: Clean up API docs infra (#2222)
1 parent 4076ea8 commit 6d4bb5e

7 files changed

Lines changed: 23 additions & 13 deletions

File tree

.github/workflows/release.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222

2323
- uses: actions/checkout@v6
2424
if: ${{ steps.release.outputs.releases_created == 'true' }}
25+
with:
26+
submodules: true
2527

2628
- uses: actions/setup-node@v6
2729
if: ${{ steps.release.outputs.releases_created == 'true' }}
@@ -57,3 +59,10 @@ jobs:
5759
if: ${{ steps.release.outputs['cli--release_created'] == 'true' }}
5860
working-directory: cli
5961
run: npm publish --ignore-scripts
62+
63+
- name: Publish API docs
64+
if: ${{ steps.release.outputs.release_created == 'true' }}
65+
run: |
66+
git config user.name "github-actions[bot]"
67+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
68+
npm run docs:publish

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "lib/jsdoc-template"]
2+
path = lib/jsdoc-template
3+
url = https://github.com/protobufjs/jsdoc-template.git

config/jsdoc.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"outputSourceFiles" : false
2121
},
2222
"applicationName": "protobuf.js",
23-
"googleAnalytics": "UA-40277577-3",
23+
"applicationSubtitle": "API documentation",
2424
"linenums" : true
2525
},
2626
"markdown" : {
@@ -34,8 +34,9 @@
3434
"private" : false,
3535
"lenient" : false,
3636
"destination" : "./docs",
37-
"template" : "./node_modules/jaguarjs-jsdoc",
38-
"sourceRoot" : "https://github.com/dcodeIO/protobuf.js/blob/master/src/",
39-
"repo" : "https://github.com/dcodeIO/protobuf.js"
37+
"template" : "./lib/jsdoc-template",
38+
"sourceRoot" : "https://github.com/protobufjs/protobuf.js/blob/master/src/",
39+
"repo" : "https://github.com/protobufjs/protobuf.js",
40+
"repoBranch" : "master"
4041
}
41-
}
42+
}

eslint.config.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module.exports = [
1515
"docs/**",
1616
"examples/**",
1717
"lib/deep-equal/**",
18+
"lib/jsdoc-template/**",
1819
"lib/prelude.js",
1920
"lib/polyfill.js",
2021
"lib/tape-adapter.js",

lib/jsdoc-template

Submodule jsdoc-template added at 9207af9

package-lock.json

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@
2626
"coverage": "npm run coverage:test && npm run coverage:report",
2727
"coverage:test": "nyc --silent tape -r ./lib/tape-adapter tests/*.js tests/node/*.js",
2828
"coverage:report": "nyc report --reporter=lcov --reporter=text",
29-
"docs": "jsdoc -c config/jsdoc.json -R README.md --verbose --pedantic",
29+
"docs": "npm run docs:build",
30+
"docs:build": "jsdoc -c config/jsdoc.json -R README.md --verbose --pedantic",
31+
"docs:publish": "npm run docs:build && node scripts/pages",
3032
"lint": "npm run lint:sources && npm run lint:types",
3133
"lint:sources": "eslint \"**/*.js\"",
3234
"lint:types": "tslint \"**/*.d.ts\" -e \"**/node_modules/**\" -t stylish -c config/tslint.json",
33-
"pages": "node scripts/pages",
3435
"prepublish": "cd cli && npm install && cd .. && npm run build",
3536
"prepublishOnly": "cd cli && npm install && cd .. && npm run build",
3637
"postinstall": "node scripts/postinstall",
@@ -64,7 +65,6 @@
6465
"gulp-if": "^3.0.0",
6566
"gulp-sourcemaps": "^3.0.0",
6667
"gulp-uglify": "^3.0.2",
67-
"jaguarjs-jsdoc": "github:dcodeIO/jaguarjs-jsdoc",
6868
"jsdoc": "^4.0.0",
6969
"minimist": "^1.2.0",
7070
"nyc": "^18.0.0",

0 commit comments

Comments
 (0)