// cell clean - Remove build artifacts from modules/

var io = use('io')

log.console(io.searchpath())

if (!io.exists('.cell/build')) {
  log.console("No build directory found")
  $_.stop()
  return
}

log.console("Cleaning build artifacts...")

// Remove the build directory
try {
  io.rmdir('.cell/build')
  log.console("Build directory removed")
} catch (e) {
  log.error("Failed during cleanup: " + e)
}

log.console("Clean complete!")

$_.stop()