Skip to content

Commit

Permalink
chore: remove compodoc and replace with jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
sofisl committed Oct 30, 2024
1 parent 5c5e0c8 commit dd3f234
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ module.exports = {
markdown: {
idInHeadings: true,
},
};
};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"prepare": "npm run compile",
"test": "c8 mocha build/test",
"predocs": "npm run build-tools",
"docs": "node build/src/generator/docs",
"docs": "npm run compile && node build/src/generator/docs",
"predocs2": "npm run compile",
"docs-extract": "node --max-old-space-size=8192 ./node_modules/@microsoft/api-extractor/bin/api-extractor run --local --verbose",
"docs-md": "node --max-old-space-size=8192 ./node_modules/@microsoft/api-documenter/bin/api-documenter markdown --input-folder build/docs --output-folder docs",
Expand Down Expand Up @@ -79,10 +79,10 @@
"execa": "^5.0.0",
"gaxios": "^6.0.3",
"gts": "^5.0.0",
"js-green-licenses": "^4.0.0",
"jsdoc": "^4.0.0",
"jsdoc-fresh": "^3.0.0",
"jsdoc-region-tag": "^3.0.0",
"js-green-licenses": "^4.0.0",
"linkinator": "^4.0.0",
"mocha": "^9.2.2",
"mv": "^2.1.1",
Expand Down
9 changes: 5 additions & 4 deletions src/generator/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ import * as path from 'path';
import {promisify} from 'util';
import Q from 'p-queue';

const srcPath = path.join(__dirname, '../../../src');
const rootPath = path.join(__dirname, '../../..');
const srcPath = path.join(rootPath, 'src');
const apiPath = path.join(srcPath, 'apis');
const templatePath = path.join(srcPath, 'generator/templates/index.html.njk');
const docsPath = path.join(__dirname, '../../../docs');
const docsPath = path.join(rootPath, 'docs');
const indexPath = path.join(docsPath, 'index.html');

export const gfs = {
Expand Down Expand Up @@ -53,14 +54,14 @@ export async function main() {
const q = new Q({concurrency: 50});
console.log(`Generating docs for ${dirs.length} APIs...`);
let i = 0;
const promises = dirs.map(dir => {
const promises = dirs.map(async dir => {
return q
.add(() =>
gfs.execa(process.execPath, [
'--max-old-space-size=8192',
'./node_modules/.bin/jsdoc',
'-c',
`.jsdoc.js`,
'.jsdoc.js',
])
)
.then(() => {
Expand Down

0 comments on commit dd3f234

Please sign in to comment.