lib/processors/jsdoc/jsdocGenerator.js
async function buildJsdoc({sourcePath, configPath}) {
	const args = [
		require.resolve("jsdoc/jsdoc"),
		"-c",
		configPath,
		"--verbose",
		sourcePath
	];
	return new Promise((resolve, reject) => {
		const child = spawn("node", args, {
			stdio: ["ignore", "ignore", process.stderr]
		});
		child.on("close", function(code) {
			if (code === 0 || code === 1) {
				resolve();
			} else {
				reject(new Error(`JSDoc child process closed with code ${code}`));
			}
		});
	});
}
async function buildJsdoc({sourcePath, configPath}) {
	const args = [
		require.resolve("jsdoc/jsdoc"),
		"-c",
		configPath,
		"--verbose",
		sourcePath
	];
	return new Promise((resolve, reject) => {
		const child = spawn("node", args, {
			stdio: ["ignore", "ignore", process.stderr]
		});
		child.on("close", function(code) {
			if (code === 0 || code === 1) {
				resolve();
			} else {
				reject(new Error(`JSDoc child process closed with code ${code}`));
			}
		});
	});
}
async function buildJsdoc ( { sourcePath , configPath } ) { const args = [ require . resolve ( "jsdoc/jsdoc" ) , "-c" , configPath , "--verbose" , sourcePath ] ; return new Promise ( ( resolve , reject ) => { const child = spawn ( "node" , args , { stdio : [ "ignore" , "ignore" , process . stderr ] } ) ; child . on ( "close" , function ( code ) { if ( code === 0 || code === 1 ) { resolve ( ) ; } else { reject ( new Error ( ` ${ code } ` ) ) ; } } ) ; } ) ; }
Execute JSDoc build by spawning JSDoc as an external process

@private
@param {Object} parameters Parameters
@param {string} parameters.sourcePath Project resources (input for JSDoc generation)
@param {string} parameters.configPath Full path to jsdoc-config.json file
@returns {Promise<undefined>}
Execute JSDoc build by spawning JSDoc as an external process