 _    = require('underscore')
 fs   = require('fs')
 path = require('path')
+tty  = require('tty')
 
 UnsupportedError = js2coffee.UnsupportedError
 

      process.exit 1

    _.each files, (fname) -> work fname

module.exports =
  run: (args...) ->

  files = process.argv.slice(2)
  work  = proc or build_and_show

  if tty.isatty process.stdin
    # Nothing on stdin.
    if files.length == 0
      console.warn "Usage:"
      console.warn "  #{cmd} file.js"
