function generateDestination(folder, regex, file) {
  const match = regex.exec(file);
  if (match) {
    const { path, componentName } = match.groups;
    return join(folder, path, `x-components.${componentName}.md`);
  } else {
    return '';
  }
}
/**
 * Function to generate the documentation file path, using a regex to extract the path and file
 * name.
 * @param folder {string} - The base folder of the path.
 * @param regex {RegExp} - The the regex to extract the path and file name.
 * @param file {string} - The full path of documentation file to extract the path and file name
 * from.
 * @returns {string} - The full path of the doc file. It is a relative to `docs` folder and
 * includes de file name and extension. If it doesn't match the regex, an empty string is returned.
 */
Function to generate the documentation file path, using a regex to extract the path and file
name.
@param folder {string} - The base folder of the path.
@param regex {RegExp} - The the regex to extract the path and file name.
@param file {string} - The full path of documentation file to extract the path and file name
from.
@returns {string} - The full path of the doc file. It is a relative to `docs` folder and
includes de file name and extension. If it doesn't match the regex, an empty string is returned.
Function to generate the documentation file path using a regex to extract the path and file name . @param folder { string } - The base folder of the path . @param regex { RegExp } - The the regex to extract the path and file name . @param file { string } - The full path of documentation file to extract the path and file name from . @returns { string } - The full path of the doc file . It is a relative to ` docs ` folder and includes de file name and extension . If it doesn ' t match the regex an empty string is returned .
function generateDestination(folder, regex, file) {
  const match = regex.exec(file);
  if (match) {
    const { path, componentName } = match.groups;
    return join(folder, path, `x-components.${componentName}.md`);
  } else {
    return '';
  }
}
function generateDestination ( folder , regex , file ) { const match = regex . exec ( file ) ; if ( match ) { const { path , componentName } = match . groups ; return join ( folder , path , ` ${ componentName } ` ) ; } else { return '' ; } }
Function to generate the documentation file path, using a regex to extract the path and file
 name.
Function to generate the documentation file path using a regex to extract the path and file name .