lib/utils/fs.js
function ensureExistsAndClean (dir) {
  if (!fs.existsSync(dir)) {
    fs.mkdirSync(dir)
  } else {
    cleanDir(dir)
  }
}
function ensureExistsAndClean (dir) {
  if (!fs.existsSync(dir)) {
    fs.mkdirSync(dir)
  } else {
    cleanDir(dir)
  }
}
function ensureExistsAndClean ( dir ) { if ( ! fs . existsSync ( dir ) ) { fs . mkdirSync ( dir ) } else { cleanDir ( dir ) } }
Makes sure that the specified directory exists.
@param dir
Makes sure that the specified directory exists .