hooks/lib/android/webSiteHook.js
function saveWebHook(projectRoot, hookContent) {
  var filePath = path.join(projectRoot, WEB_HOOK_FILE_PATH);
  var isSaved = true;

  // ensure directory exists
  createDirectoryIfNeeded(path.dirname(filePath));

  // write data to file
  try {
    fs.writeFileSync(filePath, hookContent, 'utf8');
  } catch (err) {
    console.warn('Failed to create android web hook!');
    console.warn(err);
    isSaved = false;
  }

  return isSaved;
}
function saveWebHook(projectRoot, hookContent) {
  var filePath = path.join(projectRoot, WEB_HOOK_FILE_PATH);
  var isSaved = true;

  // ensure directory exists
  createDirectoryIfNeeded(path.dirname(filePath));

  // write data to file
  try {
    fs.writeFileSync(filePath, hookContent, 'utf8');
  } catch (err) {
    console.warn('Failed to create android web hook!');
    console.warn(err);
    isSaved = false;
  }

  return isSaved;
}
function saveWebHook ( projectRoot , hookContent ) { var filePath = path . join ( projectRoot , WEB_HOOK_FILE_PATH ) ; var isSaved = true ; // ensure directory exists createDirectoryIfNeeded ( path . dirname ( filePath ) ) ; // write data to file try { fs . writeFileSync ( filePath , hookContent , 'utf8' ) ; } catch ( err ) { console . warn ( 'Failed to create android web hook!' ) ; console . warn ( err ) ; isSaved = false ; } return isSaved ; }
Save data to website hook file.

@param {String} projectRoot - absolute path to project root
@param {String} hookContent - data to save
@return {boolean} true - if data was saved; otherwise - false;
Save data to website hook file .