1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-23 02:04:34 +02:00
video.js/build/doc-version.js

13 lines
464 B
JavaScript
Raw Normal View History

// Updates the "vX.X.X source" link to github in .jsdoc.json
// that will be included in the menu of the API docs
const fs = require('fs');
const jsdocConfig = require('../.jsdoc.json');
const pkgJson = require('../package.json');
jsdocConfig.opts.theme_opts.menu.find(menuItem => {
return menuItem.link === 'https://github.com/videojs/video.js';
}).title = `v${pkgJson.version} source`;
fs.writeFileSync('.jsdoc.json', JSON.stringify(jsdocConfig, null, 2));