lib/generate-report.js
function _readTemplateFile(fileName) {
    if (fileName) {
      try {
        fs.accessSync(fileName, fs.constants.R_OK);
        return fs.readFileSync(fileName, 'utf-8');
      } catch (err) {
        return fs.readFileSync(path.join(__dirname, '..', 'templates', fileName), 'utf-8');
      }
    } else {
      return "";
    }
  }
function _readTemplateFile(fileName) {
    if (fileName) {
      try {
        fs.accessSync(fileName, fs.constants.R_OK);
        return fs.readFileSync(fileName, 'utf-8');
      } catch (err) {
        return fs.readFileSync(path.join(__dirname, '..', 'templates', fileName), 'utf-8');
      }
    } else {
      return "";
    }
  }
function _readTemplateFile ( fileName ) { if ( fileName ) { try { fs . accessSync ( fileName , fs . constants . R_OK ) ; return fs . readFileSync ( fileName , 'utf-8' ) ; } catch ( err ) { return fs . readFileSync ( path . join ( __dirname , '..' , 'templates' , fileName ) , 'utf-8' ) ; } } else { return "" ; } }
Read a template file and return it's content
@param {string} fileName
@return {*} Content of the file
@private
Read a template file and return it s content