1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-15 10:39:58 +02:00
video.js/build/fix-api-docs.js
2017-03-21 17:13:06 -04:00

21 lines
492 B
JavaScript

var replace = require("replace");
var path = require('path')
var apiPath = path.join(__dirname, '..', 'docs', 'api');
var replacements = [
{find: /\/docs\/guides\/(.+)\.md/g, replace: 'tutorial-$1.html'},
{find: /tutorial-tech.html/g, replace: 'tutorial-tech_.html'},
{find: /\/docs\/guides\//g, replace: '#'}
];
replacements.forEach(function(obj) {
replace({
regex: obj.find,
replacement: obj.replace,
paths: [apiPath],
recursive: true,
silent: true
});
});