function createFilePath(directory, filename, ext) {
  const purgedFileName = filename.replace(filenamePurgeRegex, `-`);
  const shouldAddHash = purgedFileName !== filename;

  if (shouldAddHash) {
    return _path.default.join(directory, `${purgedFileName}-${createFileHash(filename)}${ext}`);
  } else {
    return _path.default.join(directory, `${filename}${ext}`);
  }
}
/**
 * createFilePath
 * --
 * Gets full file path while replacing forbidden characters with a `-`
 */


Gets full file path while replacing forbidden characters with a `-`
Gets full file path while replacing forbidden characters with a ` - `
function createFilePath(directory, filename, ext) {
  const purgedFileName = filename.replace(filenamePurgeRegex, `-`);
  const shouldAddHash = purgedFileName !== filename;
  if (shouldAddHash) {
    return _path.default.join(directory, `${purgedFileName}-${createFileHash(filename)}${ext}`);
  } else {
    return _path.default.join(directory, `${filename}${ext}`);
  }
}
function createFilePath ( directory , filename , ext ) { const purgedFileName = filename . replace ( filenamePurgeRegex , ` ` ) ; const shouldAddHash = purgedFileName !== filename ; if ( shouldAddHash ) { return _path . default . join ( directory , ` ${ purgedFileName } ${ createFileHash ( filename ) } ${ ext } ` ) ; } else { return _path . default . join ( directory , ` ${ filename } ${ ext } ` ) ; } }
createFilePath
createFilePath