 
 switches = [
   ['-w', '--watch', 'Keeps watching the file and recompiling it when it changes']
+  ['-o', '--output [DIR]', 'Specifies a directory to compile into.']
   ['-p', '--print', 'Prints the compiled html to stdout']
   ['-f', '--format', 'Applies line breaks to html output']
   ['-u', '--utils', 'Adds helper locals (currently only "render")']

else
  argv = process.argv[0..]

render = (input_path) ->
  fs.readFile input_path, (err, contents) ->
    throw err if err
    html = coffeekup.render String(contents), options
    write input_path, html

write = (input_path, html) ->
  filename = path.basename(input_path, path.extname(input_path)) + '.html'
  dir = path.dirname input_path
  output_path = path.join dir, filename
  html = ' ' if html.length <= 0
  fs.writeFile output_path, html, (err) ->
    puts html if options.print
    puts "Compiled #{input_path}" if options.watch

usage = '''
  Usage:

  if options.watch
    fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
      return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
      render file, options.output
  else render file, options.output
