mirror of
https://github.com/danbulant/jose
synced 2026-05-21 21:39:04 +00:00
19 lines
609 B
JavaScript
19 lines
609 B
JavaScript
const {
|
|
Converter: { EVENT_RESOLVE_BEGIN },
|
|
} = require("typedoc");
|
|
|
|
module.exports.load = function load(app) {
|
|
const gitRevision = app.options.getValue("gitRevision");
|
|
if (gitRevision && gitRevision !== "main") {
|
|
app.converter.on(EVENT_RESOLVE_BEGIN, ({ project: { reflections } }) => {
|
|
for (const key in reflections) {
|
|
const reflection = reflections[key];
|
|
if (reflection.comment && reflection.comment.tags) {
|
|
for (const tag of reflection.comment.tags) {
|
|
tag.text = tag.text.replace(/VERSION/g, gitRevision);
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
};
|