lib/processors/jsdoc/jsdocGenerator.js
async function generateJsdocConfig({targetPath, tmpPath, namespace, projectName, version, variants}) {
	// Backlash needs to be escaped as double-backslash
	// This is not only relevant for win32 paths but also for
	//	Unix directory names that contain a backslash in their name
	const backslashRegex = /\\/g;

	// Resolve path to this script to get the path to the JSDoc extensions folder
	const jsdocPath = path.normalize(__dirname);
	const pluginPath = path.join(jsdocPath, "lib", "ui5", "plugin.js").replace(backslashRegex, "\\\\");
	const templatePath = path.join(jsdocPath, "lib", "ui5", "template").replace(backslashRegex, "\\\\");
	const destinationPath = path.normalize(tmpPath).replace(backslashRegex, "\\\\");
	const jsapiFilePath = path.join(targetPath, "libraries", projectName + ".js").replace(backslashRegex, "\\\\");
	const apiJsonFolderPath = path.join(tmpPath, "dependency-apis").replace(backslashRegex, "\\\\");
	const apiJsonFilePath =
		path.join(targetPath, "test-resources", path.normalize(namespace), "designtime", "api.json")
			.replace(backslashRegex, "\\\\");

	const config = `{
		"plugins": ["${pluginPath}"],
		"opts": {
			"recurse": true,
			"lenient": true,
			"template": "${templatePath}",
			"ui5": {
				"saveSymbols": true
			},
			"destination": "${destinationPath}"
		},
		"templates": {
			"ui5": {
				"variants": ${JSON.stringify(variants)},
				"version": "${version}",
				"jsapiFile": "${jsapiFilePath}",
				"apiJsonFolder": "${apiJsonFolderPath}",
				"apiJsonFile": "${apiJsonFilePath}"
			}
		}
	}`;
	return config;
}
async function generateJsdocConfig({targetPath, tmpPath, namespace, projectName, version, variants}) {
	// Backlash needs to be escaped as double-backslash
	// This is not only relevant for win32 paths but also for
	//	Unix directory names that contain a backslash in their name
	const backslashRegex = /\\/g;

	// Resolve path to this script to get the path to the JSDoc extensions folder
	const jsdocPath = path.normalize(__dirname);
	const pluginPath = path.join(jsdocPath, "lib", "ui5", "plugin.js").replace(backslashRegex, "\\\\");
	const templatePath = path.join(jsdocPath, "lib", "ui5", "template").replace(backslashRegex, "\\\\");
	const destinationPath = path.normalize(tmpPath).replace(backslashRegex, "\\\\");
	const jsapiFilePath = path.join(targetPath, "libraries", projectName + ".js").replace(backslashRegex, "\\\\");
	const apiJsonFolderPath = path.join(tmpPath, "dependency-apis").replace(backslashRegex, "\\\\");
	const apiJsonFilePath =
		path.join(targetPath, "test-resources", path.normalize(namespace), "designtime", "api.json")
			.replace(backslashRegex, "\\\\");

	const config = `{
		"plugins": ["${pluginPath}"],
		"opts": {
			"recurse": true,
			"lenient": true,
			"template": "${templatePath}",
			"ui5": {
				"saveSymbols": true
			},
			"destination": "${destinationPath}"
		},
		"templates": {
			"ui5": {
				"variants": ${JSON.stringify(variants)},
				"version": "${version}",
				"jsapiFile": "${jsapiFilePath}",
				"apiJsonFolder": "${apiJsonFolderPath}",
				"apiJsonFile": "${apiJsonFilePath}"
			}
		}
	}`;
	return config;
}
async function generateJsdocConfig ( { targetPath , tmpPath , namespace , projectName , version , variants } ) { // Backlash needs to be escaped as double-backslash // This is not only relevant for win32 paths but also for //	Unix directory names that contain a backslash in their name const backslashRegex = / \\ / g ; // Resolve path to this script to get the path to the JSDoc extensions folder const jsdocPath = path . normalize ( __dirname ) ; const pluginPath = path . join ( jsdocPath , "lib" , "ui5" , "plugin.js" ) . replace ( backslashRegex , "\\\\" ) ; const templatePath = path . join ( jsdocPath , "lib" , "ui5" , "template" ) . replace ( backslashRegex , "\\\\" ) ; const destinationPath = path . normalize ( tmpPath ) . replace ( backslashRegex , "\\\\" ) ; const jsapiFilePath = path . join ( targetPath , "libraries" , projectName + ".js" ) . replace ( backslashRegex , "\\\\" ) ; const apiJsonFolderPath = path . join ( tmpPath , "dependency-apis" ) . replace ( backslashRegex , "\\\\" ) ; const apiJsonFilePath = path . join ( targetPath , "test-resources" , path . normalize ( namespace ) , "designtime" , "api.json" ) . replace ( backslashRegex , "\\\\" ) ; const config = ` ${ pluginPath } ${ templatePath } ${ destinationPath } ${ JSON . stringify ( variants ) } ${ version } ${ jsapiFilePath } ${ apiJsonFolderPath } ${ apiJsonFilePath } ` ; return config ; }
Generate jsdoc-config.json content

@private
@param {Object} parameters Parameters
@param {string} parameters.targetPath Path to write any output files
@param {string} parameters.tmpPath Path to write temporary and debug files
@param {string} parameters.projectName Project name
@param {string} parameters.version Project version
@param {Array} parameters.variants JSDoc variants to be built
@returns {string} jsdoc-config.json content string
Generate jsdoc - config . json content