#!/usr/bin/env node var coffee = require('coffee-script'); var path = require('path'); var streamline = require('streamline'); if (process.argv.length >= 3 && process.argv[2][0] != '-') { // coffee-streamline myScript.coffee args // our compile hook is not called if we pass it to coffee-script command line process.argv.shift(); // remove the 'node' arg inserted by the shell require(path.join(process.cwd(), process.argv[1])); } else { // coffee-script command line with handle REPL and compiler global.error = console.log require('coffee-script/lib/command').run(); }