   stdin.on 'end', ->
     compileScript null, code
 
+# After all of the source files are done being read, concatenate and compile
+# them together.
+compileJoin = ->
+  code = contents.join '\n'
+  compileScript "concatenation", code, "concatenation"
+
 # Watch a source CoffeeScript file using `fs.watchFile`, recompiling it every
 # time the file is updated. May be used in combination with other options,
 # such as `--lint` or `--print`.

              for file in files
                compile path.join(source, file)
          else if topLevel or path.extname(source) is '.coffee'
            fs.readFile source, (err, code) -> compileScript(source, code.toString(), base)
            watch source, base if opts.watch
    compile source, true


  ['-c', '--compile',         'compile to JavaScript and save as .js files']
  ['-i', '--interactive',     'run an interactive CoffeeScript REPL']
  ['-o', '--output [DIR]',    'set the directory for compiled JavaScript']
  ['-j', '--join',            'concatenate the scripts before compiling']
  ['-w', '--watch',           'watch scripts for changes, and recompile']
  ['-p', '--print',           'print the compiled JavaScript to stdout']
  ['-l', '--lint',            'pipe the compiled JavaScript through JSLint']
