lib/template-generator.js
function buildScriptsAndStyleFiles(outputPath) {
	const stylesRegex = /<style>|<\/style>/gi,
		scriptsRegex = /<script type="text\/javascript">|<\/script>/gi;

	// creates the report directory if it doesn't exist
	if (!fs.existsSync(outputPath)) {
		fs.mkdirSync(outputPath);
	}

	// create the styles.css and main.js files
	writeFile(`${outputPath}styles.css`, styles(), stylesRegex);
	writeFile(`${outputPath}main.js`, scripts(), scriptsRegex);
}
function buildScriptsAndStyleFiles(outputPath) {
	const stylesRegex = /<style>|<\/style>/gi,
		scriptsRegex = /<script type="text\/javascript">|<\/script>/gi;

	// creates the report directory if it doesn't exist
	if (!fs.existsSync(outputPath)) {
		fs.mkdirSync(outputPath);
	}

	// create the styles.css and main.js files
	writeFile(`${outputPath}styles.css`, styles(), stylesRegex);
	writeFile(`${outputPath}main.js`, scripts(), scriptsRegex);
}
function buildScriptsAndStyleFiles ( outputPath ) { const stylesRegex = / <style>|<\/style> / gi , scriptsRegex = / <script type="text\/javascript">|<\/script> / gi ; // creates the report directory if it doesn't exist if ( ! fs . existsSync ( outputPath ) ) { fs . mkdirSync ( outputPath ) ; } // create the styles.css and main.js files writeFile ( ` ${ outputPath } ` , styles ( ) , stylesRegex ) ; writeFile ( ` ${ outputPath } ` , scripts ( ) , scriptsRegex ) ; }
Creates a styles.css and a main.js file for the report
@param {string} currWorkingDir The current working directory
Creates a styles . css and a main . js file for the report